From 387f8afac65970ae830913ed04a6f0c560da3bc9 Mon Sep 17 00:00:00 2001 From: frank Date: Thu, 15 Dec 2011 10:33:51 -0800 Subject: [PATCH] Bug 12565 - no check for correctness of the options given during cloud-setup-database steps status 12565: resolved fixed --- setup/bindir/cloud-setup-databases.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in index 3c9c03210b5..b673bd12f42 100755 --- a/setup/bindir/cloud-setup-databases.in +++ b/setup/bindir/cloud-setup-databases.in @@ -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() - \ No newline at end of file +