Nova commit [1] has changed the format of the block_device_mapping.
We need to adapt our way how we get the list of host wwpns.
[1] 0258cecaca
Change-Id: I852aeeb57c891c8bd1458c83feae05f58046eb8a
VLAN networking is not supported by nova-dpm. This patch
introduces a new exception that is thrown if somebody tries
to connect a DPM instance to a VLAN network.
Change-Id: I00e10d33040fed62a446b8a1df8eb9ae534a7a43
When a invalid vif_type was given, we used to throw a generic
exception. This patch introduces a new specific exception
InvalidVIFTypeError.
Change-Id: I225e1ccb6fead59b26a011b0ad02b28983751f87
We now can add all NICs with a single command!
This is also usefull once we might introduce ssc support which
requires additional verifications cross all nics.
Change-Id: Ic78686b662c97d67d6376e8b8592aa20887026f8
Patches [1][2] confused block_device_info (bdi) with
block_device_mapping (bdm). We always need the bdm. Nova_dpm's spawn
method now transforms the passed in bdi into a bdm.
[1] 112c4cda58
[2] 255d62a20b
Change-Id: Id3ec0b1861bedab76db42233d49752a277892c77
This patch modifies the method prep_for_spawn
* Making it private -> _prep_for_spawn
* Removing unused parameters
Change-Id: Ie2e2259badef350082b150b7989a93e85c09e9db
In prep_for_spawn we checked if the an image was provided
during launch. If so we aborted. This check is redundant, as we already
check this in _get_partition_instance.
The Unittests are still correct!
Change-Id: Idfee4d6dd80043c9a468b42c7b33dc7669a2529d
For some actions (e.g. downloading an image) we need the context
to be present in PartitionIstance. This patch introduces
the context property in this class. In addition context is set
during launch.
It is not required during other operations for now.
Change-Id: I01b7bee02e79c9b141731a88f7afb77bed7ae1cc
Till now the String was generated and set from the driver class.
This patch moves both actions into the PartitionInstance class.
This allows us overwriting this method once we support another
partition type (e.g. ssc).
Change-Id: If535cbdcdf878f5e9e2f91d0f0d1128021efcbbc
For each nic we need to add some data to the partitions
boot-os-specific-parameters property. Till now we were accumulating
everything to a single string which set the property once. The new
approach is to update the property for each nic.
This leads to more read/write accesses on this partition property. But
on the other hand we're gaining flexibility. E.g. someone might want to
add a NIC after spawn. Or some other data should be added. Those
scenarios were not supported in the past.
This is also helpful to move this code into the partitioninstance
class. In the future this action might not be required for all type of
partitions (e.g. not for ssc).
Change-Id: I0262f2660b3e89b455bb1b1ece016342c8347c80
We extract the pieces that generate the nic dict from the attach_nic
method into a separate method. This allows overwriting the creation
of the dict once we support for example ssc.
Change-Id: I17642d78b62eb71b0d89bec1fb6cd552b11f6fd8
The DPMVIF object represents a VIF (virtual interface for networking).
Nova provides us a large dictionary. This object provides a better method
to access properties of a vif.
Change-Id: I1e6c408c244330d9e59b988aecacce82e2c07b8e
We build up all the properties required for boot now in the
vm class. The driver does not need to deal with gathering
information for boot anymore.
Change-Id: Iad15a7a404a3467d417f27e739a3e4dc7233af6f
This object should simplify the usage of the block_device dictionary
provided by nova. Attributes can now easily be accesed via object
properties and method, instead of doing complex operations on the dict.
This patch does not yet exploit this object. This is done in a follow
up patch.
Change-Id: I4b88761c86dc8996fb490cf8680ceaf1480d445d
The set_boot_hba uri method can determine the boot-hba-uri on its own
as this information is available in the object instance.
Change-Id: I39f15db7865457a7e91452e7a024bc4944a5317b
In some cases we need the hba object to retrieve the wwpn of
the hba used for boot, in some the element-uri. We had 2 different
ways of gathering this information.
This patch transforms the get_boot_hba_uri method into a more generic
get_boot_hba method. From this object it's easy to retrieve the
required properties 'element-uri' and 'wwpn'.
Change-Id: If518a915408caf5c59d4425b8aa2e0673acbcc19
In some methods we directly created an instance of the PartitionInstnace object.
The instantiation of this object is now moved into a separate method. This is
even more usefull when we introduce ssc support in the future. In that case
we could simply introduce a SSCPartitionInstance class. The newly created method
would be the only place where the decission between ssc and pure dpm is done.
Change-Id: I06e6d8ee84b7f308f2cdbf120c08e46afd4dd8be
Following updates are made to the signature of spawn method and its
corresponding references in test_driver.py.
- add "allocations" kw arg as per [1]
- remove "flavor" kw arg as per [2]
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-October/123738.htm
[2] 8749bda96e
Closes-Bug: 1724744
Change-Id: I6fd6974a0b32bbcc520a2fdd2c948367f3e8ae5f
Signed-off-by: Sreeram Vancheeswaran <sreeram.vancheeswaran@in.ibm.com>
Release Notes section was returning empty for nova-dpm in RTD.
This patch fixes the same.
Closes-Bug: 1718103
Change-Id: Iac1832331b50f1b971c686be77d83a60f1bd53cd
Signed-off-by: Sreeram Vancheeswaran <sreeram.vancheeswaran@in.ibm.com>
Remove loop_status_update function and use
wait_for_status which is provided by zhmcclient
Closes-Bug: #1672979
Change-Id: I9b0d4edbfd9ccf44bae38afceff6200501511807
Signed-off-by: Prabhat Ranjan <pranjank@in.ibm.com>
It seems nova removed 'instance.instance_type_id'
by which we were getting flavor.
Now instance has 'instance.flavor'.
Direct access of flavor.
Closes-Bug: #1707628
Change-Id: I128d8adb0754c5b5313fc3e5ed7c521afa0df508
Signed-off-by: Prabhat Ranjan <pranjank@in.ibm.com>
With the current local.conf it is not possible to use floating-ips
to access an instance.
This patch extends and refactors the local.conf, that devstack creates
2 networks. A public network (used for floating ip) - public, and a
private network where the instances get attached to - provider.
In addition the ovs is configured to be able to deal with both networks.
However one manual step is required. The bridge br-provider needs to be
created manually before stack.sh is run.
Change-Id: I776552c41161d53d33ad9c6c750f47ef6d5ccce6
When we do inband shutdown of partition using
command 'shutdown -P now'
Then partition is not going to 'stopped' state.
It is going to 'PAUSED' state.
In DPM there is no such implementation so that we
can start partition from PAUSED state. So workaround
is we need to stop the partition then start.
This patch also includes the cases when partition is
in "starting/stopping" state.
Closes-Bug: #1678002
Change-Id: I1898b85a8441c3175db0a6de6d620bca19af69ec
Signed-off-by: Prabhat Ranjan <pranjank@in.ibm.com>
After new version of os-dpm-1.1.0 cpc_object_id
is breaking in unit test
Change-Id: Ic17ff50549756728c1213a946d98b0fe2203e813
Signed-off-by: Prabhat Ranjan <pranjank@in.ibm.com>
This is in connection with the minimum value assigned to the max-memory
parameter in local.conf under dpm section.The default value of
reserve_host_memory is 512Mb by which it blocks 512Mb of memory on the
host this means to launch an instance on a host 1024 is the minimum
memory that is needed as 512Mb is being reserved inorder to mitigate
this issue the reserved memory is made 0.
Change-Id: I05ee4275cd5d80b1edb614d94fe0b038551bc3cc
If HMC is up and CPC is down then the 'ifl-processor' and
'storage-customer' values are 0.
Closes-Bug: #1684102
Change-Id: If7c10ca66c4e47c873cc9c7277a715dee3040ad5
Signed-off-by: Prabhat Ranjan <pranjank@in.ibm.com>