def configure(self): IAMRequest.configure(self) parsed = six.moves.urllib.parse.urlparse(self.args.get('Url') or '') if parsed.scheme != 'https': raise ArgumentError('URL must begin with "https://"') if not parsed.netloc: raise ArgumentError('URL must name a host to connect to')
def configure(self): try: IAMRequest.configure(self) except requestbuilder.exceptions.AuthError as err: if (os.path.exists(CLC_CRED_CHECK_FILE) and len(err.args) > 0 and isinstance(err.args[0], six.string_types)): msg = ("{0}. If a cloud controller is running, you " "can assume administrator credentials with " "eval `clcadmin-assume-system-credentials`") err.args = (msg.format(err.args[0]), ) + err.args[1:] raise
def configure(self): try: IAMRequest.configure(self) except requestbuilder.exceptions.AuthError as err: if (os.path.exists(CLC_CRED_CHECK_FILE) and len(err.args) > 0 and isinstance(err.args[0], six.string_types)): msg = ("{0}. If a cloud controller is running, you " "can assume administrator credentials with " "eval `clcadmin-assume-system-credentials`") err.args = (msg.format(err.args[0]),) + err.args[1:] raise
def configure(self): IAMRequest.configure(self) if self.args['Password'] is None: self.log.info('no password supplied; prompting') self.params['Password'] = prompt_for_password()
def configure(self): IAMRequest.configure(self) if self.args["Password"] is None: self.log.info("no password supplied; prompting") self.params["Password"] = prompt_for_password()