Changed name of cpc_uuid config option to cpc_object_id
Reason for the change is that the HMC API book does not mention anywhere that the format of the ID is a UUID, and the name of the resource property is "object-id". This change set changes the name of the DPM config option "cpc_uuid" to "cpc_object_id", and the devstack variables CPC_UUID to CPC_OBJECT_ID, and updates any use of that and the unit testcases accordingly. Change-Id: I6153ac791d4296101dc00f23dfb7fb7c3d2fee2c Partial-Bug: 1659304 Signed-off-by: Andreas Maier <maiera@de.ibm.com>
This commit is contained in:
parent
44d5c02320
commit
5fa46366d9
@ -28,7 +28,7 @@ max_instances = 10
|
||||
max_memory = 5000
|
||||
max_processors = 2
|
||||
host = foo
|
||||
cpc_uuid = <cpc-uuid>
|
||||
cpc_object_id = <cpc-object-id>
|
||||
hmc_password = <password>
|
||||
hmc_username = <user>
|
||||
hmc = <ip>
|
||||
|
@ -55,7 +55,7 @@ function configure_nova_dpm {
|
||||
iniset $NOVA_CONF dpm hmc_username $HMC_USERNAME
|
||||
iniset $NOVA_CONF dpm hmc_password $HMC_PASSWORD
|
||||
iniset $NOVA_CONF dpm host $HOST
|
||||
iniset $NOVA_CONF dpm cpc_uuid $CPC_UUID
|
||||
iniset $NOVA_CONF dpm cpc_object_id $CPC_OBJECT_ID
|
||||
iniset $NOVA_CONF dpm max_processors $MAX_PROC
|
||||
iniset $NOVA_CONF dpm max_memory $MAX_MEM
|
||||
iniset $NOVA_CONF dpm max_instances $MAX_INSTANCES
|
||||
|
@ -15,7 +15,7 @@ HMC=$HMC
|
||||
HMC_USERNAME=$HMC_USERNAME
|
||||
HMC_PASSWORD=$HMC_PASSWORD
|
||||
HOST=$HOST
|
||||
CPC_UUID=$CPC_UUID
|
||||
CPC_OBJECT_ID=$CPC_OBJECT_ID
|
||||
MAX_PROC=$MAX_PROC
|
||||
MAX_MEM=$MAX_MEM
|
||||
MAX_INSTANCES=$MAX_INSTANCES
|
||||
|
@ -45,7 +45,7 @@ ALL_DPM_OPTS = [
|
||||
Password for connection to the HMC"""),
|
||||
cfg.StrOpt('host', default='', required=True, help="""
|
||||
Name of the OpenStack hypervisor host"""),
|
||||
cfg.StrOpt('cpc_uuid', help="""
|
||||
cfg.StrOpt('cpc_object_id', help="""
|
||||
Object-id of the target CPC"""),
|
||||
cfg.IntOpt('max_processors', help="""
|
||||
Maximum number of shared physical IFL processors on the target CPC that can
|
||||
|
@ -16,7 +16,7 @@
|
||||
def getFakeCPCconf():
|
||||
|
||||
conf = {'cpcsubset_name': "S12subset",
|
||||
'cpc_uuid': "1232132",
|
||||
'cpc_object_id': "1232132",
|
||||
'max_processors': 10,
|
||||
'max_memory_mb': 200,
|
||||
'max_partitions': 10
|
||||
|
@ -104,7 +104,7 @@ def getFakeCPC(cpcmanager=None):
|
||||
def getFakeCPCconf():
|
||||
|
||||
conf = {'cpcsubset_name': "S12subset",
|
||||
'cpc_uuid': "1232132",
|
||||
'cpc_object_id': "1232132",
|
||||
'max_processors': 10,
|
||||
'max_memory_mb': 200,
|
||||
'max_partitions': 10
|
||||
|
@ -74,7 +74,7 @@ class DPMDriver(driver.ComputeDriver):
|
||||
|
||||
# retrieve from ncpu service configurationfile
|
||||
self._conf = {'cpcsubset_name': CONF.dpm.host,
|
||||
'cpc_uuid': CONF.dpm.cpc_uuid,
|
||||
'cpc_object_id': CONF.dpm.cpc_object_id,
|
||||
'max_processors': CONF.dpm.max_processors,
|
||||
'max_memory_mb': CONF.dpm.max_memory,
|
||||
'max_partitions': CONF.dpm.max_instances,
|
||||
@ -82,11 +82,11 @@ class DPMDriver(driver.ComputeDriver):
|
||||
CONF.dpm.physical_storage_adapter_mappings}
|
||||
|
||||
self._cpc = self._client.cpcs.find(**{
|
||||
"object-id": self._conf['cpc_uuid']})
|
||||
LOG.debug("Matching hypervisor found %(cpcsubset_name)s for UUID "
|
||||
"%(uuid)s and CPC %(cpcname)s" %
|
||||
"object-id": self._conf['cpc_object_id']})
|
||||
LOG.debug("Matching hypervisor found %(cpcsubset_name)s for object-id "
|
||||
"%(cpcid)s and CPC %(cpcname)s" %
|
||||
{'cpcsubset_name': self._conf['cpcsubset_name'],
|
||||
'uuid': self._conf['cpc_uuid'],
|
||||
'cpcid': self._conf['cpc_object_id'],
|
||||
'cpcname': self._cpc.properties['name']})
|
||||
|
||||
utils.valide_host_conf(self._conf, self._cpc)
|
||||
|
@ -32,11 +32,11 @@ def valide_host_conf(conf, cpc):
|
||||
errormsg = (_("max_processors %(config_proc)s configured for "
|
||||
"CpcSubset %(cpcsubset_name)s is greater than the "
|
||||
"available amount of processors %(max_proc)s on "
|
||||
"CPC uuid %(cpcuuid)s and CPC name %(cpcname)s")
|
||||
"CPC object-id %(cpcid)s and CPC name %(cpcname)s")
|
||||
% {'config_proc': conf['max_processors'],
|
||||
'cpcsubset_name': conf['cpcsubset_name'],
|
||||
'max_proc': cpc.properties['processor-count-ifl'],
|
||||
'cpcuuid': conf['cpc_uuid'],
|
||||
'cpcid': conf['cpc_object_id'],
|
||||
'cpcname': cpc.properties['name']})
|
||||
raise exception.ValidationError(errormsg)
|
||||
if (conf['max_memory_mb'] > cpc.properties['storage-customer']):
|
||||
@ -44,11 +44,11 @@ def valide_host_conf(conf, cpc):
|
||||
errormsg = (_("max_memory_mb %(config_mem)s configured for "
|
||||
"CpcSubset %(cpcsubset_name)s is greater than the "
|
||||
"available amount of memory %(max_mem)s on CPC "
|
||||
"uuid %(cpcuuid)s and CPC name %(cpcname)s")
|
||||
"object-id %(cpcid)s and CPC name %(cpcname)s")
|
||||
% {'config_mem': conf['max_processors'],
|
||||
'cpcsubset_name': conf['cpcsubset_name'],
|
||||
'max_mem': cpc.properties['processor-count-ifl'],
|
||||
'cpcuuid': conf['cpc_uuid'],
|
||||
'cpcid': conf['cpc_object_id'],
|
||||
'cpcname': cpc.properties['name']})
|
||||
raise exception.ValidationError(errormsg)
|
||||
|
||||
|
@ -114,7 +114,7 @@ class PartitionInstance(object):
|
||||
|
||||
@property
|
||||
def partition_name(self):
|
||||
"""This function will create partition name using uuid
|
||||
"""This function will create partition name using the instance uuid
|
||||
|
||||
:return: name of partition
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user