Cleanup unused concurrent_disk_operations references in the code

The concurrent_disk_operations is a helm override and is no longer
used as a capability by sysinv for profiles and CLI commands.

instance_backing is also deprecated and will also be cleaned up
in a subsequent task.

Change-Id: I5679fb29dda9dd5630e9226aea49e89188573812
Story: 2004764
Task: 30118
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2019-06-20 10:40:00 -05:00
parent 70609a3d55
commit abd4525f5e
7 changed files with 10 additions and 43 deletions

View File

@ -1545,7 +1545,7 @@ badMediaType (415)
:widths: 20, 20, 20, 60
"volumegroup_id", "URI", "csapi:UUID", "The unique identifier of an existing LVM volume group."
"capabilities (Optional)", "plain", "xsd:string", "A dictionary of key-value pairs prepresenting volume group parameters and values. Valid nova-local parameters are: ``instance_backing``, and ``concurrent_disk_operations``. Valid cinder-volumes parameters are: ``lvm_type``"
"capabilities (Optional)", "plain", "xsd:string", "A dictionary of key-value pairs prepresenting volume group parameters and values. Valid nova-local parameters are: ``instance_backing``. Valid cinder-volumes parameters are: ``lvm_type``"
**Response parameters**

View File

@ -180,11 +180,6 @@ def do_host_lvg_delete(cc, args):
choices=['image', 'remote'],
help=("Type of instance backing. "
"Allowed values: image, remote. [nova-local]"))
@utils.arg('-c', '--concurrent_disk_operations',
metavar='<concurrent disk operations>',
help=("Set the number of concurrent I/O intensive disk operations "
"such as glance image downloads, image format conversions, "
"etc. [nova-local]"))
@utils.arg('-l', '--lvm_type',
metavar='<lvm_type>',
choices=['thick', 'thin'],
@ -195,22 +190,17 @@ def do_host_lvg_modify(cc, args):
# Get all the fields from the command arguments
field_list = ['hostnameorid', 'lvgnameoruuid',
'instance_backing', 'concurrent_disk_operations', 'lvm_type']
'instance_backing', 'lvm_type']
fields = dict((k, v) for (k, v) in vars(args).items()
if k in field_list and not (v is None))
all_caps_list = ['instance_backing', 'concurrent_disk_operations',
'lvm_type']
integer_fields = ['concurrent_disk_operations']
all_caps_list = ['instance_backing', 'lvm_type']
requested_caps_dict = {}
for cap in all_caps_list:
if cap in fields:
try:
if cap in integer_fields:
requested_caps_dict[cap] = int(fields[cap])
else:
requested_caps_dict[cap] = fields[cap]
requested_caps_dict[cap] = fields[cap]
except ValueError:
raise exc.CommandError(
'{0} value {1} is invalid'.format(cap, fields[cap]))

View File

@ -333,7 +333,6 @@
<xs:extension base="xs:string">
<xs:attribute type="Lvm_vg_name" name="lvm_vg_name" use="required" />
<xs:attribute type="Instance_backing" name="instance_backing" use="required" />
<xs:attribute type="xs:positiveInteger" name="concurrent_disk_operations" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>

View File

@ -158,10 +158,9 @@
The lvg tags below define the local volume group
lvm_vg_name: local volume group name
instance_backing: image, or remote
concurrent_disk_operations: number of parallel I/O intensive disk operations
-->
<disk path="/dev/sdb" size="223" />
<lvg lvm_vg_name="nova-local" instance_backing="image" concurrent_disk_operations="2" />
<lvg lvm_vg_name="nova-local" instance_backing="image" />
</localstorageProfile>
<localstorageProfile name="localstorage-profile_remote">
@ -171,10 +170,9 @@
The lvg tags below define the local volume group
lvm_vg_name: local volume group name
instance_backing: image, or remote
concurrent_disk_operations: number of parallel I/O intensive disk operations
-->
<disk path="/dev/sdb" size="223" />
<lvg lvm_vg_name="nova-local" instance_backing="remote" concurrent_disk_operations="2" />
<lvg lvm_vg_name="nova-local" instance_backing="remote" />
</localstorageProfile>

View File

@ -410,8 +410,7 @@ def _cinder_volumes_patch_semantic_checks(caps_dict):
def _nova_local_patch_semantic_checks(caps_dict):
# make sure that only valid capabilities are provided
valid_caps = set([constants.LVG_NOVA_PARAM_BACKING,
constants.LVG_NOVA_PARAM_DISK_OPS])
valid_caps = set([constants.LVG_NOVA_PARAM_BACKING])
invalid_caps = set(caps_dict.keys()) - valid_caps
# Do we have something unexpected?
@ -426,14 +425,6 @@ def _nova_local_patch_semantic_checks(caps_dict):
msg = _('No parameter specified. No action taken')
raise wsme.exc.ClientSideError(msg)
# Make sure that the concurrent disk operations floor is
# valid_actions -> Always present regardless of mode
if constants.LVG_NOVA_PARAM_DISK_OPS in caps_dict and \
caps_dict[constants.LVG_NOVA_PARAM_DISK_OPS] < 1:
msg = _('Invalid parameter: %s must be > 0' %
constants.LVG_NOVA_PARAM_DISK_OPS)
raise wsme.exc.ClientSideError(msg)
def _lvg_pre_patch_checks(lvg_obj, patch_obj):
lvg_dict = lvg_obj.as_dict()
@ -744,9 +735,7 @@ def _create(lvg, iprofile=None, applyprofile=None):
else:
lvg_caps_dict = {
constants.LVG_NOVA_PARAM_BACKING:
constants.LVG_NOVA_BACKING_IMAGE,
constants.LVG_NOVA_PARAM_DISK_OPS:
constants.LVG_NOVA_PARAM_DISK_OPS_DEFAULT
constants.LVG_NOVA_BACKING_IMAGE
}
lvg_caps.update(lvg_caps_dict)
LOG.info("Updated lvg capabilities=%s" % lvg_caps)

View File

@ -1817,17 +1817,12 @@ def _create_localstorage_profile(profile_name, profile_node):
try:
ilvg = ilvgs_local[0]
instance_backing = ilvg.get(constants.LVG_NOVA_PARAM_BACKING)
concurrent_disk_operations = ilvg.get(constants.LVG_NOVA_PARAM_DISK_OPS)
if instance_backing == constants.LVG_NOVA_BACKING_IMAGE:
capabilities_dict = {constants.LVG_NOVA_PARAM_BACKING:
constants.LVG_NOVA_BACKING_IMAGE,
constants.LVG_NOVA_PARAM_DISK_OPS:
int(concurrent_disk_operations)}
constants.LVG_NOVA_BACKING_IMAGE}
elif instance_backing == constants.LVG_NOVA_BACKING_REMOTE:
capabilities_dict = {constants.LVG_NOVA_PARAM_BACKING:
constants.LVG_NOVA_BACKING_REMOTE,
constants.LVG_NOVA_PARAM_DISK_OPS:
int(concurrent_disk_operations)}
constants.LVG_NOVA_BACKING_REMOTE}
else:
return ("Error", _('error: Local Storage profile %s is invalid')
% profile_name,

View File

@ -584,7 +584,6 @@ PV_NAME_UNKNOWN = 'unknown'
# Storage: Volume Group Parameter Types
LVG_NOVA_PARAM_BACKING = 'instance_backing'
LVG_NOVA_PARAM_DISK_OPS = 'concurrent_disk_operations'
LVG_CINDER_PARAM_LVM_TYPE = 'lvm_type'
# Storage: Volume Group Parameter: Nova: Backing types
@ -595,9 +594,6 @@ LVG_NOVA_BACKING_REMOTE = 'remote'
LVG_CINDER_LVM_TYPE_THIN = 'thin'
LVG_CINDER_LVM_TYPE_THICK = 'thick'
# Storage: Volume Group Parameter: Nova: Concurrent Disk Ops
LVG_NOVA_PARAM_DISK_OPS_DEFAULT = 2
# Controller audit requests (force updates from agents)
DISK_AUDIT_REQUEST = "audit_disk"
LVG_AUDIT_REQUEST = "audit_lvg"