diff --git a/devstack/local.conf.singlenode.nova_neutron b/devstack/local.conf.singlenode.nova_neutron index 5706ef5..e7abbdc 100644 --- a/devstack/local.conf.singlenode.nova_neutron +++ b/devstack/local.conf.singlenode.nova_neutron @@ -28,7 +28,7 @@ max_instances = 10 max_memory = 5000 max_processors = 2 host = foo -cpc_uuid = +cpc_object_id = hmc_password = hmc_username = hmc = @@ -43,4 +43,4 @@ hmc_password = hmc_username = hmc = cpc_name = -physical_adapter_mappings = "public::" \ No newline at end of file +physical_adapter_mappings = "public::" diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 9f01841..e96b8e5 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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 diff --git a/devstack/settings b/devstack/settings index 26bb5ae..e51ba9d 100644 --- a/devstack/settings +++ b/devstack/settings @@ -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 diff --git a/nova_dpm/conf/dpm.py b/nova_dpm/conf/dpm.py index 101c52d..78163a9 100644 --- a/nova_dpm/conf/dpm.py +++ b/nova_dpm/conf/dpm.py @@ -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 diff --git a/nova_dpm/tests/unit/virt/dpm/fakeutils.py b/nova_dpm/tests/unit/virt/dpm/fakeutils.py index fbee927..b96bc02 100644 --- a/nova_dpm/tests/unit/virt/dpm/fakeutils.py +++ b/nova_dpm/tests/unit/virt/dpm/fakeutils.py @@ -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 diff --git a/nova_dpm/tests/unit/virt/dpm/fakezhmcclient.py b/nova_dpm/tests/unit/virt/dpm/fakezhmcclient.py index 574c148..1a4fd3e 100644 --- a/nova_dpm/tests/unit/virt/dpm/fakezhmcclient.py +++ b/nova_dpm/tests/unit/virt/dpm/fakezhmcclient.py @@ -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 diff --git a/nova_dpm/virt/dpm/driver.py b/nova_dpm/virt/dpm/driver.py index d040bc6..a4dea04 100644 --- a/nova_dpm/virt/dpm/driver.py +++ b/nova_dpm/virt/dpm/driver.py @@ -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) diff --git a/nova_dpm/virt/dpm/utils.py b/nova_dpm/virt/dpm/utils.py index f2ba647..841e07a 100644 --- a/nova_dpm/virt/dpm/utils.py +++ b/nova_dpm/virt/dpm/utils.py @@ -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) diff --git a/nova_dpm/virt/dpm/vm.py b/nova_dpm/virt/dpm/vm.py index b2fafc4..33466c5 100644 --- a/nova_dpm/virt/dpm/vm.py +++ b/nova_dpm/virt/dpm/vm.py @@ -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 """