def get(self, app): client_map = { 'vm': VmClient, 'iam': IamClient, 'disk': DiskClient, 'mongodb': MongodbClient, 'mps': MpsClient, 'streambus': StreambusClient, 'ipanti': IpantiClient, 'rds': RdsClient, 'redis': RedisClient, 'monitor': MonitorClient, 'vpc': VpcClient, 'xdata': XdataClient, 'nc': NcClient, 'oss': OssClient, } profile_manager = ProfileManager() cli_config = profile_manager.load_current_profile() if cli_config is None: return None logger = get_logger(app.pargs.debug) config = Config(cli_config.endpoint, cli_config.scheme) credential = Credential(cli_config.access_key, cli_config.secret_key) if self.__service not in client_map: return None client = client_map[self.__service](credential, config, logger) return client
def get(self, app): client_map = { 'rds': RdsClient, 'kubernetes': KubernetesClient, 'streamcomputer': StreamcomputerClient, 'ipanti': IpantiClient, 'oss': OssClient, 'redis': RedisClient, 'deploy': DeployClient, 'sop': SopClient, 'function': FunctionClient, 'portal': PortalClient, 'clouddnsservice': ClouddnsserviceClient, 'cps': CpsClient, 'cdn': CdnClient, 'streambus': StreambusClient, 'httpdns': HttpdnsClient, 'mps': MpsClient, 'disk': DiskClient, 'nc': NcClient, 'vm': VmClient, 'pod': PodClient, 'ams': AmsClient, 'jdro': JdroClient, 'zfs': ZfsClient, 'datastar': DatastarClient, 'kms': KmsClient, 'elite': EliteClient, 'iam': IamClient, 'iothub': IothubClient, 'jcq': JcqClient, 'baseanti': BaseantiClient, 'ias': IasClient, 'mongodb': MongodbClient, 'live': LiveClient, 'jdfusion': JdfusionClient, 'vpc': VpcClient, 'monitor': MonitorClient, 'xdata': XdataClient, 'cr': CrClient, } profile_manager = ProfileManager() cli_config = profile_manager.load_current_profile() if cli_config is None: return None logger = get_logger(app.pargs.debug) config = Config(cli_config.endpoint, cli_config.scheme, int(cli_config.timeout)) credential = Credential(cli_config.access_key, cli_config.secret_key) if self.__service not in client_map: return None client = client_map[self.__service](credential, config, logger) return client
def invoke_shell(self, credential): singer = Signer(get_logger(False)) singer.sign(self.__method, self.__service, self.__region_id, self.__url, self.__headers, '', credential, '') web_socket.invoke_shell(self.__url, self.__headers)
def get(self, app): client_map = { 'rds': RdsClient, 'kubernetes': KubernetesClient, 'vqd': VqdClient, 'streamcomputer': StreamcomputerClient, 'ipanti': IpantiClient, 'ssl': SslClient, 'domainservice': DomainserviceClient, 'jmr': JmrClient, 'oss': OssClient, 'redis': RedisClient, 'billing': BillingClient, 'deploy': DeployClient, 'sop': SopClient, 'function': FunctionClient, 'portal': PortalClient, 'jdccs': JdccsClient, 'logs': LogsClient, 'clouddnsservice': ClouddnsserviceClient, 'cps': CpsClient, 'cdn': CdnClient, 'streambus': StreambusClient, 'apigateway': ApigatewayClient, 'httpdns': HttpdnsClient, 'disk': DiskClient, 'sts': StsClient, 'nc': NcClient, 'vm': VmClient, 'nativecontainer': NativecontainerClient, 'iotcore': IotcoreClient, 'pod': PodClient, 'ams': AmsClient, 'jdro': JdroClient, 'zfs': ZfsClient, 'vod': VodClient, 'yundingdatapush': YundingdatapushClient, 'datastar': DatastarClient, 'kms': KmsClient, 'elite': EliteClient, 'ossopenapi': OssopenapiClient, 'iam': IamClient, 'iothub': IothubClient, 'sms': SmsClient, 'jcq': JcqClient, 'resourcetag': ResourcetagClient, 'baseanti': BaseantiClient, 'ias': IasClient, 'mongodb': MongodbClient, 'jdfusion': JdfusionClient, 'live': LiveClient, 'detection': DetectionClient, 'iotlink': IotlinkClient, 'renewal': RenewalClient, 'yunding': YundingClient, 'vpc': VpcClient, 'monitor': MonitorClient, 'xdata': XdataClient, 'containerregistry': ContainerregistryClient, 'partner': PartnerClient, 'lb': LbClient, 'industrydata': IndustrydataClient, } profile_manager = ProfileManager() cli_config = profile_manager.load_current_profile() if cli_config is None: return None logger = get_logger(app.pargs.debug) config = Config(cli_config.endpoint, cli_config.scheme, int(cli_config.timeout)) credential = Credential(cli_config.access_key, cli_config.secret_key) if self.__service not in client_map: return None client = client_map[self.__service](credential, config, logger) return client