mirror of https://github.com/apache/cloudstack.git
Bug 12565 - no check for correctness of the options given during cloud-setup-database steps
status 12565: resolved fixed
This commit is contained in:
parent
5338828f76
commit
387f8afac6
|
|
@ -410,6 +410,10 @@ for full help
|
|||
self.info("Mysql user password:%s"%self.password, True)
|
||||
self.info("Mysql server ip:%s"%self.host, True)
|
||||
self.info("Mysql server port:%s"%self.port, True)
|
||||
|
||||
def validateParameters():
|
||||
if self.encryptiontype != 'file' or self.encryptiontype != 'web':
|
||||
self.errorAndExit('Wrong encryption type %s, --encrypt-type can only be "file" or "web'%self.encryptiontype)
|
||||
|
||||
#---------------------- option parsing and command line checks ------------------------
|
||||
usage = """%prog user:[password]@mysqlhost:[port] [--deploy-as=rootuser:[rootpassword]] [--auto=/path/to/server-setup.xml]
|
||||
|
|
@ -454,6 +458,7 @@ for full help
|
|||
(self.options, self.args) = self.parser.parse_args()
|
||||
parseCasualCredit()
|
||||
parseOtherOptions()
|
||||
validateParameters()
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
|
|
@ -473,4 +478,4 @@ for full help
|
|||
if __name__ == "__main__":
|
||||
o = DBDeployer()
|
||||
o.run()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue