Distributed cloud: Fix Patch Orchestration
The dcmanager failed to create patch strategy for sub-clouds. This problem is caused by keyword argument name mismatch in the vim interfaces that used by the dcmanager. The argument names that have compute reference have been changed to worker on the vim side while the dcmanager still uses the old names. This update changes all compute references to worker in dcmanagerclient. Closes-Bug:1821081 Depends-On: https://review.openstack.org/#/c/645011/ Change-Id: I04488623ef601422352f77372259e4a514c11681 Signed-off-by: Tao Liu <tao.liu@windriver.com>
This commit is contained in:
parent
e7ddbe45c9
commit
0203b97ef8
@ -31,15 +31,15 @@ DEFAULT_REGION_NAME = "RegionOne"
|
|||||||
class SwUpdateOptions(base.Resource):
|
class SwUpdateOptions(base.Resource):
|
||||||
resource_name = 'sw_update_options'
|
resource_name = 'sw_update_options'
|
||||||
|
|
||||||
def __init__(self, manager, cloud, storage_apply_type, compute_apply_type,
|
def __init__(self, manager, cloud, storage_apply_type, worker_apply_type,
|
||||||
max_parallel_computes, alarm_restriction_type,
|
max_parallel_workers, alarm_restriction_type,
|
||||||
default_instance_action,
|
default_instance_action,
|
||||||
created_at, updated_at):
|
created_at, updated_at):
|
||||||
self.manager = manager
|
self.manager = manager
|
||||||
self.cloud = cloud
|
self.cloud = cloud
|
||||||
self.storage_apply_type = storage_apply_type
|
self.storage_apply_type = storage_apply_type
|
||||||
self.compute_apply_type = compute_apply_type
|
self.worker_apply_type = worker_apply_type
|
||||||
self.max_parallel_computes = max_parallel_computes
|
self.max_parallel_workers = max_parallel_workers
|
||||||
self.alarm_restriction_type = alarm_restriction_type
|
self.alarm_restriction_type = alarm_restriction_type
|
||||||
self.default_instance_action = default_instance_action
|
self.default_instance_action = default_instance_action
|
||||||
self.created_at = created_at
|
self.created_at = created_at
|
||||||
@ -86,8 +86,8 @@ class sw_update_options_manager(base.ResourceManager):
|
|||||||
self,
|
self,
|
||||||
cloud=json_object['name'],
|
cloud=json_object['name'],
|
||||||
storage_apply_type=json_object['storage-apply-type'],
|
storage_apply_type=json_object['storage-apply-type'],
|
||||||
compute_apply_type=json_object['compute-apply-type'],
|
worker_apply_type=json_object['worker-apply-type'],
|
||||||
max_parallel_computes=json_object['max-parallel-computes'],
|
max_parallel_workers=json_object['max-parallel-workers'],
|
||||||
alarm_restriction_type=json_object['alarm-restriction-type'],
|
alarm_restriction_type=json_object['alarm-restriction-type'],
|
||||||
default_instance_action=json_object['default-instance-action'],
|
default_instance_action=json_object['default-instance-action'],
|
||||||
created_at=json_object['created-at'],
|
created_at=json_object['created-at'],
|
||||||
@ -107,8 +107,8 @@ class sw_update_options_manager(base.ResourceManager):
|
|||||||
self,
|
self,
|
||||||
cloud=json_object['name'],
|
cloud=json_object['name'],
|
||||||
storage_apply_type=json_object['storage-apply-type'],
|
storage_apply_type=json_object['storage-apply-type'],
|
||||||
compute_apply_type=json_object['compute-apply-type'],
|
worker_apply_type=json_object['worker-apply-type'],
|
||||||
max_parallel_computes=json_object['max-parallel-computes'],
|
max_parallel_workers=json_object['max-parallel-workers'],
|
||||||
alarm_restriction_type=json_object[
|
alarm_restriction_type=json_object[
|
||||||
'alarm-restriction-type'],
|
'alarm-restriction-type'],
|
||||||
default_instance_action=json_object[
|
default_instance_action=json_object[
|
||||||
@ -134,8 +134,8 @@ class sw_update_options_manager(base.ResourceManager):
|
|||||||
self,
|
self,
|
||||||
cloud=json_object['name'],
|
cloud=json_object['name'],
|
||||||
storage_apply_type=json_object['storage-apply-type'],
|
storage_apply_type=json_object['storage-apply-type'],
|
||||||
compute_apply_type=json_object['compute-apply-type'],
|
worker_apply_type=json_object['worker-apply-type'],
|
||||||
max_parallel_computes=json_object['max-parallel-computes'],
|
max_parallel_workers=json_object['max-parallel-workers'],
|
||||||
alarm_restriction_type=json_object['alarm-restriction-type'],
|
alarm_restriction_type=json_object['alarm-restriction-type'],
|
||||||
default_instance_action=json_object['default-instance-action'],
|
default_instance_action=json_object['default-instance-action'],
|
||||||
created_at=json_object['created-at'],
|
created_at=json_object['created-at'],
|
||||||
|
@ -32,8 +32,8 @@ def options_detail_format(sw_update_options=None):
|
|||||||
columns = (
|
columns = (
|
||||||
'cloud',
|
'cloud',
|
||||||
'storage apply type',
|
'storage apply type',
|
||||||
'compute apply type',
|
'worker apply type',
|
||||||
'max parallel computes',
|
'max parallel workers',
|
||||||
'alarm restriction type',
|
'alarm restriction type',
|
||||||
'default instance action',
|
'default instance action',
|
||||||
'created_at',
|
'created_at',
|
||||||
@ -44,8 +44,8 @@ def options_detail_format(sw_update_options=None):
|
|||||||
data = (
|
data = (
|
||||||
sw_update_options.cloud,
|
sw_update_options.cloud,
|
||||||
sw_update_options.storage_apply_type,
|
sw_update_options.storage_apply_type,
|
||||||
sw_update_options.compute_apply_type,
|
sw_update_options.worker_apply_type,
|
||||||
sw_update_options.max_parallel_computes,
|
sw_update_options.max_parallel_workers,
|
||||||
sw_update_options.alarm_restriction_type,
|
sw_update_options.alarm_restriction_type,
|
||||||
sw_update_options.default_instance_action,
|
sw_update_options.default_instance_action,
|
||||||
sw_update_options.created_at,
|
sw_update_options.created_at,
|
||||||
@ -61,8 +61,8 @@ def options_list_format(sw_update_option=None):
|
|||||||
columns = (
|
columns = (
|
||||||
'cloud',
|
'cloud',
|
||||||
'storage apply type',
|
'storage apply type',
|
||||||
'compute apply type',
|
'worker apply type',
|
||||||
'max parallel computes',
|
'max parallel workers',
|
||||||
'alarm restriction type',
|
'alarm restriction type',
|
||||||
'default instance action',
|
'default instance action',
|
||||||
)
|
)
|
||||||
@ -71,8 +71,8 @@ def options_list_format(sw_update_option=None):
|
|||||||
data = (
|
data = (
|
||||||
sw_update_option.cloud,
|
sw_update_option.cloud,
|
||||||
sw_update_option.storage_apply_type,
|
sw_update_option.storage_apply_type,
|
||||||
sw_update_option.compute_apply_type,
|
sw_update_option.worker_apply_type,
|
||||||
sw_update_option.max_parallel_computes,
|
sw_update_option.max_parallel_workers,
|
||||||
sw_update_option.alarm_restriction_type,
|
sw_update_option.alarm_restriction_type,
|
||||||
sw_update_option.default_instance_action,
|
sw_update_option.default_instance_action,
|
||||||
)
|
)
|
||||||
@ -100,17 +100,17 @@ class UpdateSwUpdateOptions(base.DCManagerShowOne):
|
|||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--compute-apply-type',
|
'--worker-apply-type',
|
||||||
required=True,
|
required=True,
|
||||||
choices=['parallel', 'serial'],
|
choices=['parallel', 'serial'],
|
||||||
help='Compute node apply type (parallel or serial).'
|
help='Compute node apply type (parallel or serial).'
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--max-parallel-computes',
|
'--max-parallel-workers',
|
||||||
required=True,
|
required=True,
|
||||||
type=int,
|
type=int,
|
||||||
help='Maximum number of parallel computes.'
|
help='Maximum number of parallel workers.'
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -142,8 +142,8 @@ class UpdateSwUpdateOptions(base.DCManagerShowOne):
|
|||||||
dcmanager_client = self.app.client_manager.sw_update_options_manager
|
dcmanager_client = self.app.client_manager.sw_update_options_manager
|
||||||
kwargs = dict()
|
kwargs = dict()
|
||||||
kwargs['storage-apply-type'] = parsed_args.storage_apply_type
|
kwargs['storage-apply-type'] = parsed_args.storage_apply_type
|
||||||
kwargs['compute-apply-type'] = parsed_args.compute_apply_type
|
kwargs['worker-apply-type'] = parsed_args.worker_apply_type
|
||||||
kwargs['max-parallel-computes'] = parsed_args.max_parallel_computes
|
kwargs['max-parallel-workers'] = parsed_args.max_parallel_workers
|
||||||
kwargs['alarm-restriction-type'] = parsed_args.alarm_restriction_type
|
kwargs['alarm-restriction-type'] = parsed_args.alarm_restriction_type
|
||||||
kwargs['default-instance-action'] = parsed_args.default_instance_action
|
kwargs['default-instance-action'] = parsed_args.default_instance_action
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user