diff --git a/otcextensions/osclient/cce/v2/cluster.py b/otcextensions/osclient/cce/v2/cluster.py index cf58fb1f0..305058e2b 100644 --- a/otcextensions/osclient/cce/v2/cluster.py +++ b/otcextensions/osclient/cce/v2/cluster.py @@ -129,6 +129,8 @@ def take_action(self, parsed_args): if not parsed_args.wait: attrs['wait'] = False + # initialize sdk_connection with cce methods + _ = self.app.client_manager.cce if parsed_args.cluster: self.app.client_manager.sdk_connection.delete_cce_cluster( **attrs @@ -234,6 +236,8 @@ def take_action(self, parsed_args): if parsed_args.multi_az: attrs['az'] = 'multi_az' + # initialize sdk_connection with cce methods + _ = self.app.client_manager.cce obj = self.app.client_manager.sdk_connection.create_cce_cluster( **attrs) diff --git a/otcextensions/osclient/rds/v3/instance.py b/otcextensions/osclient/rds/v3/instance.py index 7ee759d0c..d6ab93ff3 100644 --- a/otcextensions/osclient/rds/v3/instance.py +++ b/otcextensions/osclient/rds/v3/instance.py @@ -352,6 +352,9 @@ def get_parser(self, prog_name): def take_action(self, parsed_args): # Attention: not conform password result in BadRequest with no info + + # initialize sdk_connection with rds methods + _ = self.app.client_manager.rds client = self.app.client_manager.sdk_connection attrs = {} for attr in [ @@ -407,6 +410,8 @@ def get_parser(self, prog_name): return parser def take_action(self, parsed_args): + # initialize sdk_connection with rds methods + _ = self.app.client_manager.rds client = self.app.client_manager.sdk_connection attrs = {} for attr in [