When updating the MAC spoofing for a given vswitch port, its
Msvm_EthernetSwitchPortSecuritySettingData object is removed
and a new one is created, but the original object is not
cleared from the cache. Because of this, the next update will
fail with a Not Found exception.
This patch addresses this issue.
Closes-Bug: #1744755
Change-Id: I91b9000c64d269b7d5b1db9e0c6344bbd70e37b2
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr
(probably was used by some tox wrapper script before)
Change-Id: I9e013fe5ce2abc6a9850d62a9a455c4090d200da
This change adds a processutils module, which includes several
process/job helpers.
Associating a job with a process will allow ensuring that when a
parent process is killed, processes associated with jobs (e.g. child
processes) will be killed as well.
This is especially useful for Cinder, which will use it for the
multiple backend per service scenario.
Job objects may have resource limits. We may use jobs in order to
implement resource limit support within oslo_concurrency (currently
not available on Windows).
Related-Bug: #1734334
Change-Id: Icc2bbe9191e6db685c0fd294abc1d0eb24bc420c
This change adds support for attaching/detaching VHD images, as well
as retrieving the attached disk "physical" path.
This also adds support for changing disk online/readonly status,
as well as retrieving its size.
This feature will be used by os-brick, aiming to add volume backup
support for the Windows SMB Cinder driver.
Implements: blueprint vhd-attach-detach
Change-Id: I4ed28606a7f5643a2ccfef24d198649e28c59a3b
The method signature and behaviour has changed. The method will no longer
set VM's memory and vCPUs, update_vm should be called for this behaviour.
In order to maintain compatiblity with the previous usage, both
behaviours were kept.
After the old usage has been updated, the old behaviour can be safely
removed.
Change-Id: Iead1e1d4597394a1bebab87b2416baada1657e94
Related: blueprint hyper-v-vnuma-enable
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: Icb8bcec5166dd151336455c69db8e4c4067ac8c5
SR-IOV support has been added to Hyper-V since Windows / Hyper-V
Server 2012.
In order to properly use SR-IOV, the host must support it, and have it
enabled, and it must have SR-IOV capable NICs.
The Hyper-V vSwitches will have to be configured to enable SR-IOV.
vmutils: create_nic - mac_address can now be None. If None,
a dynamic address will be used instead.
hostuils: added get_nic_sriov_vfs - returns a list of dictionaries,
containing available vSwitch VFs.
networkutils: added set_vswitch_port_sriov - enables / disables SR-IOV
on the given switch port.
Implements: blueprint os-win-sriov
Change-Id: Ied27bb4e1b36e743b33c6b65351c2ee942ef535e
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.
Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.
This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.
Change-Id: I16981e37c2e641c05fa65d5151b3dadf1e951482
The oslosphinx theme has been deprecated. Besides, we're currently
inconsistent with the other project docs themes.
Change-Id: I6a7a105d8b689ff5e5ca2f7829ce06d166e8db2e
This change adds an automatically generated config sample to the
os-win docs.
The config sample is generated each time the docs are built, using
the oslo.config sphinxconfiggen extension.
Related-Bug: #1709648
Change-Id: I01f44bf02c92ecfced6d5266caa40683a0a9248e
This change will allow generating a config sample using the
oslo.config generator.
Generating an os_win config sample may be requested by using:
oslo-config-generator --namespace os_win
Closes-Bug: #1709648
Change-Id: Icc39a472cb05bfd0bcb673959b40b0d2e6e89077
At the moment, we're raising a generic HyperVException when
attempting to retrieve a non-existent vSwitch.
This change adds a 'HyperVvSwitchNotFound' exception, which will
allow callers to better handle such situations.
Change-Id: I221622bc050cf634f86edde49e26c09ee30b177e
At the moment, if requested to destroy an inexistent VM NIC,
os-win will raise an IndexError, which is not really helpful.
In quite a few other cases, we're silently continuing when dealing
with missing resources. We'll do the same here as well.
Change-Id: Ibe290ba2521a808f3dba150de33f9be0b3519e7c
Related-Bug: #1724282
This change adds a setter and getter for the SAN policy, controlling
the way in which new disks will be handled (brought online or not).
Validating this policy will help prevent common vm disk attachment
issues when dealing with passthrough disks.
Related-Bug: #1727257
Change-Id: I25033c15b77f494a417c9cd01d194a8bfb3cfe13
This change adds a new method returning available extensions for
a given vswitch. It returns a list of dicts that include vswitch
extension information.
This method is required by the Neutron Hyper-V agent in order to
validate a configured vSwitch.
Note that this change also adds the CIM enabled state constants
(which are re-used for various type of resources).
Related-Bug: #1592777
Change-Id: I0856a23030480d435fd0582fc6b4bc688c98ae93
os-win allows retrieving information regarding VM disk attachments.
This change ensures that the disk controller address is included as
well in the returned dict. This will allow building full disk paths,
as exposed to Hyper-V guests.
Change-Id: I6f2c6ecf71d3254d64bc24574619c18184d3d055
Related-Bug: #1723431
When setting the VM disk boot order, we're passing Msvm_DiskDrive
WMI object paths in case of passthrough disks and the actual image
file paths in case of vhd/x images.
In order to determine the disk type, os-win checks if the path is
an existing file path (using os.path.exist), which is extremely
inefficient. The call can take up to a minute in case of a
passthrough disk.
This patch updates the logic so that we're checking if the provided
path resembles a Msvm_DiskDrive WMI object path. The
'_is_drive_physical' method is removed due to its limited scope.
Change-Id: I0fc7a8b5f1feabe07fc1707d8469b929b3739a1d
Closes-Bug: #1723448
At the moment, we allow tagging passthrough VM disk attachments.
In order to avoid fetching the actual disk path, which can be a
time consuming operation, this change will allow fetching disk
attachment info by serial tag as well (which is assumed to be
unique).
Change-Id: I7a4c242c80b5b3562bf9513deb89071b5bb5bf28
Related-Bug: #1723431
Hyper-V disk QoS is supported on Windows / Hyper-V Server 2012 R2
(OS version 6.3) or newer. It cannot be set on earlier versions.
If the set_disk_qos_specs method is called on Windows / Hyper-V Server
2012 with non-zero values, an os_win.exceptions.UnsupportedOperation
exception will be raised.
If the given min_iops and max_iops arguments are None or zero, the
method will be no-op: QoS doesn't need to be enabled, nor disabled
(0 means that QoS is disabled).
Change-Id: Ia3b47477ba6814153bf0ab74ec9737a01bb11678
Closes-Bug: #1716891
Disk rescans are time consuming operations. We're trying to reduce
the amount of rescan calls by aggregating them. Basically, if a
rescan is already in proggress, we're waiting for it to complete
without issuing a new request.
This behavior is disabled by default and can be enabled using the
'merge_requests' argument.
Change-Id: I6132d05c6ca7725226348f9fa8237e1810e65a7d
The FCP logical unit number can be used in order to identify a LU
on the target side. This allows sending SCSI commands targetting
a specific LU.
For this reason, we're now including it when returning the FC target
mappings.
Related-Bug: #1694671
Change-Id: Id8139c4ceb0f195199f7284efe12263eb5e597dc
This change adds two new public methods that will allow retrieving
disks by device number or unique id.
Related-Bug: #1694671
Change-Id: I7c7bbbf422e4f55dde11b90ffc29c1b34901e2e2
This change allows retrieving SCSI Unique IDs for FibreChannel LUNs.
We're sending a SCSI INQUIRY request on the specified LUN, parsing
the retrieved VPD page. We're also selecting the identifiers based
on Windows support and order of precedence.
This will allow discovering FibreChannel disks in a more efficient
way.
Related-Bug: #1694671
Change-Id: I86d953d000e6d0244e8e8f2aaf2cbd76305cb63b
At the moment, we're using WWNs represented either as byte arrays,
hex strings or ctypes structures. Needless to say, this is quite
confusing as the fc_utils methods accept multiple formats.
As per this change, we're accepting WWNs represented as hex strings
in case of the public methods (just as before), while for private
methods we're using ctypes WWN structures (containing 8 byte arrays),
which in turn are passed to hbaapi.dll functions.
Some arguments are renamed/documented accordingly. Note that the
helper methods converting those WWNs are moved to the '_utils'
module, as those will be reused by a subsequent change.
Change-Id: I43daf4ad943d0097c951c2ad4ccb856a2fe9e1bc