コード例 #1
0
 def configure(self):
     BootstrapRequest.configure(self)
     fmt = self.args.get('format')
     if (fmt in ('yaml', None) or fmt.startswith('format:') or
             fmt in FORMATS):
         return fmt
     raise ArgumentError(
         'invalid format string; choose from {0} or prepend with "format:" to '
         'build your own'.format(','.join(['yaml'] + FORMATS.keys())))
コード例 #2
0
ファイル: describeevents.py プロジェクト: zemkai/eucalyptus
 def configure(self):
     BootstrapRequest.configure(self)
     fmt = self.args.get('format')
     if (fmt in ('yaml', None) or fmt.startswith('format:')
             or fmt in FORMATS):
         return fmt
     raise ArgumentError(
         'invalid format string; choose from {0} or prepend with "format:" to '
         'build your own'.format(','.join(['yaml'] + FORMATS.keys())))
コード例 #3
0
 def configure(self):
     BootstrapRequest.configure(self)
     if not self.args.get('ec2_service'):
         self.args['ec2_service'] = \
             DescribeInstances.SERVICE_CLASS.from_other(
                 self.service, url=self.args.get('ec2_url'))
コード例 #4
0
 def configure(self):
     BootstrapRequest.configure(self)
     if not self.args.get('ec2_service'):
         self.args['ec2_service'] = \
             DescribeInstances.SERVICE_CLASS.from_other(
                 self.service, url=self.args.get('ec2_url'))
コード例 #5
0
 def configure(self):
     BootstrapRequest.configure(self)
     if not self.args.get("ec2_service"):
         self.args["ec2_service"] = DescribeInstances.SERVICE_CLASS.from_other(
             self.service, url=self.args.get("ec2_url")
         )