Commit Graph

296 Commits

Author SHA1 Message Date
Andreas Jaeger 3b2f07a90d Retire repo
This repo was created by accident, use deb-python-os-win
instead.

Needed-By: I1ac1a06931c8b6dd7c2e73620a0302c29e605f03
Change-Id: I81894aea69b9d09b0977039623c26781093a397a
2017-04-17 19:31:14 +02:00
Swapnil Kulkarni (coolsvap) 579ec01225 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Ie4f93273345a2bf2eaf71ecf5b0c80a13af2565c
2016-07-22 06:37:08 +00:00
OpenStack Proposal Bot 5e78a0ba99 Updated from global requirements
Change-Id: I10bf51eed2f450959510dc0e3b1efbbc78387a85
2016-07-12 16:41:09 +00:00
Jenkins 9fc0f0456e Merge "Adds method for returning DNS Zone properties" 2016-07-12 11:10:08 +00:00
Alin Balutoiu eb6923fe7d Adds method for returning DNS Zone properties
Currently, if there is an existing DNS Zone, there
is no way to find information about the zone
which can be useful in some circumstances.

This patch addresses this issue by adding a method
which will return the DNS Zone properties as
a dictionary.

Change-Id: I20bc579e615ee69a1f94677284b30ef69918f45d
Related blueprint: os-win-dnsutils
2016-07-08 14:58:36 +03:00
Jenkins 6995d7dbc1 Merge "iSCSI tgt utils: remove workaround needed by old WMI lib" 2016-07-06 15:11:23 +00:00
Jenkins 783da16e01 Merge "Add instance job terminate timeout" 2016-07-06 12:30:14 +00:00
Lucian Petrut baab11716e iSCSI tgt utils: remove workaround needed by old WMI lib
Previously, we needed a workaround in order to set CHAP credentials,
having to explicitly use property setters.

Switching to PyMI broke the method setting CHAP credentials.
The fix consists in simply dropping this workaround, setting the
attributes directly.

Change-Id: I3578fee0618ba758063c11c94e36fa101a616558
Closes-Bug: #1598813
2016-07-06 13:41:35 +03:00
Lucian Petrut b5d60890e2 Add instance job terminate timeout
This change lets the caller set a timeout for the job terminate
operation. If the timeout is None or 0, this operation will wait
undefinetely for the jobs to be terminated (while attempting to
stop them).

Also, error state jobs are now properly handled, as we were not
considering them to be finished.

Change-Id: I47beec8b36cecd9db3960c2deff09e342418046a
2016-07-06 13:13:25 +03:00
Jenkins eb7121311d Merge "Hyper-V: Added checking secure VMs status" 2016-07-06 09:03:59 +00:00
Simona Iuliana Toader 88cd6e42b9 Hyper-V: Added checking secure VMs status
Added method for checking Shielded/Encrypted VMs status.

Change-Id: Ia32c31d821796c3c02f031e2a081f40b161c6eb1
2016-07-05 04:20:42 -07:00
OpenStack Proposal Bot 660d2b5dba Updated from global requirements
Change-Id: I1e990d743cd9aa3200c6f967b9704b0fb7a81aad
2016-06-30 18:48:07 +00:00
Lucian Petrut bcc5ce23b6 Properly handle stopping VM jobs
When destroying a VM, we attempt to terminate the jobs affecting it.

We just loop through the jobs and try to kill them, but by the
time we do this, the jobs can disappear, in which case we'll get a
"Not Found" exception.

In this case, it is safe to catch this exception and ignore it.

After looping through the jobs, we'll just fetch again the jobs
affecting the element, raising an exception only if there still
are pending jobs.

Also, if a job is killed, the check_ret_val method now raises an
exception instead of wrongfully reporting it as successfully
completed.

Closes-Bug: 1566292

Change-Id: I93f9b5be11a7dc1b81b3d896fb88c0b0b4c4b31c
2016-06-28 13:56:40 +03:00
Jenkins ca42846c19 Merge "Add utils for managing DNS operations" 2016-06-28 10:29:35 +00:00
Alin Balutoiu efb482181d Add utils for managing DNS operations
Currently, there is no support in os_win for
managing Microsoft DNS Server related operations.

This patch addresses this issue by adding support
for DNS operations in os_win.

Change-Id: I029747555a58e0a8e362b65e6c0c470cf2774e42
Implements: blueprint os-win-dnsutils
2016-06-27 15:48:14 +03:00
Jenkins dc104e17d2 Merge "Fix for VM's not getting IP due to missing SG rules" 2016-06-27 11:17:54 +00:00
krishna kanth 433d1e4027 Fix for VM's not getting IP due to missing SG rules
This patch set fixes missing outbound/inbound rules due
to missing SG rules due to synchronizatin issues while
adding and removing rules seen on a scale environment

Removes sleep calls from networkutils. These calls should
be done outside os-win, if necessary.

Change-Id: I91aec85f00a1e9d1bd51b646521b538695762259
Co-Authored-By: sonu <sonu.sudhakaran@gmail.com>
Co-Authored-By: ShivaKumar M <shiva.kum.m@hp.com>
Co-Authored-By: Vinod Kumar <vinod.kumar5@hpe.com>
Closes-Bug: 1591114
2016-06-27 10:41:46 +00:00
OpenStack Proposal Bot 2d6e43c000 Updated from global requirements
Change-Id: Ic5088fc1a87b0405f8c9febef90187355002b01a
2016-06-21 18:04:10 +00:00
Jenkins 3d48e1de3f Merge "Updated from global requirements" 2016-06-10 12:43:22 +00:00
Jenkins 8fd1f63f24 Merge "Fixes loading HGS namespace on early builds of Windows 10" 2016-06-10 10:45:22 +00:00
Jenkins 51257fa013 Merge "Fix disk rescan method" 2016-06-10 10:37:29 +00:00
Jenkins 6998895e7d Merge "Add method for checking whether a share is local" 2016-06-10 10:22:11 +00:00
Jenkins 49f1e9616d Merge "Fix event handle leaks" 2016-06-10 10:19:12 +00:00
Simona Iuliana Toader e34566c208 Fixes loading HGS namespace on early builds of Windows 10
Root/Microsoft/Windows/Hgs namespace is not available on early
versions of Windows 10. This issue is fixed by setting the HGS
namespace as a property.

Change-Id: I95bc9cf20f28099ee0869c5996ddd13b449f8ba2
2016-06-10 10:05:58 +00:00
Lucian Petrut 111db692ae Add method for checking whether a share is local
Mounting loopback highly available shares is not supported.

The Hyper-V Nova driver needs a way to check whether a share is
local and use the local path in that case.

This change adds a method that attempts to resolve the share server
address and compare the IPs with the local IPs.

In case of a share exposed by a Scale-Out server, we'll use the
Distributed Node Name of the share, which points to all the nodes
of the cluster.

ddt is added as a requirement.

Change-Id: I04ac0b514ccac9c910728da205f0f0f11b43509a
Partial-Bug: #1580122
2016-06-09 16:00:17 +03:00
Lucian Petrut 16a1eed7ff Fix disk rescan method
After issuing a rescan using diskpart, the FC volume mappings for
the desired volumes are found, but the device name is missing
(e.g. http://paste.openstack.org/show/509180/).

This happens in 25% of the attaches. Simply querying for the disks
after the rescan seems to fix the issue.

Closes-Bug: #1590754

Change-Id: Iaee472259daf7857c7492acdc0eb56ae6cdb2684
2016-06-09 15:34:29 +03:00
Jenkins 8467da39e7 Merge "Fix iSCSI initiator utils docstring" 2016-06-09 12:23:03 +00:00
Lucian Petrut f51fe15f19 Fix event handle leaks
The named pipe handler leaks event handles, due to the fact that
the events used for signaling async IO operation completion are
never closed.

This change fixes the issue, closing the event handles along with
the named pipe handle.

Closes-Bug: #1587863

Change-Id: Ic006a3f5b210260cff1a3167dedc2f0a443f5793
2016-06-09 12:17:38 +00:00
Jenkins d5b951674c Merge "Add missing wmi to requirements.txt" 2016-06-09 11:57:07 +00:00
Jenkins 44042e05ec Merge "Hyper-V: Shielded VMs" 2016-06-08 15:17:01 +00:00
Simona Iuliana Toader 411732ee18 Hyper-V: Shielded VMs
Shielded VMs in Windows Server 2016 protect virtual
machines from Hyper-V administrators with the help
of encryption technologies. Attaching vTPM devices
to the Hyper-V VMs offers users the posibility to
enhance their security and system integrity. This
blueprint implements this feature.

Implements: blueprint os-win-shielded-vms

Change-Id: I28c54b1cab1ec98c60c7dba257291b1656429b80
2016-06-08 09:35:57 +00:00
Jenkins 962cef3d88 Merge "iSCSI utils: accept rescan_attempts arg in login method" 2016-06-08 09:11:39 +00:00
OpenStack Proposal Bot 1ffa212944 Updated from global requirements
Change-Id: Ic141abeb07796fc5557c0bde73c5a1dfa3e80ef4
2016-06-03 18:17:44 +00:00
Lucian Petrut 6741ee831c Fix iSCSI initiator utils docstring
The method retrieving the available iSCSI initiator HBAs has
an incorrect docstring.

Since this method has a very similar name with the method retrieving
the iSCSI initiator node name, having a correct docstring is
important in order to avoid confussions.

Change-Id: Ie1e6739ec88c052a856a5be5d437fb18de28611b
2016-06-02 15:35:11 +03:00
Lucian Petrut 56b95db2ef iSCSI utils: accept rescan_attempts arg in login method
In order to be a drop in replacement for the old iSCSI utils module
and easily be used by the Nova driver, the new iSCSI initiator
utils module had to keep the same interface.

The login_storage_target method will call by default the
'ensure_lun_available' method, which will perform some rescans if
needed, after establishing the iSCSI session.

For this reason, it would make sense for this method to accept
the maximum number of rescans as an argument that will be passed
to 'ensure_lun_available'.

This will be helpful for the os-brick Windows iSCSI connector.

Change-Id: Ibbf134931a43dcf3e64f234582a8ebe079e65184
2016-06-01 12:33:37 +03:00
Thomas Bechtold 8b11dde218 Add missing wmi to requirements.txt
Change-Id: I2739001c1bd4b07ac464c74f71495a562da8dc40
2016-05-30 20:12:20 +02:00
Jenkins b9f87121c9 Merge "Add method for retrieving local share paths" 2016-05-23 18:00:44 +00:00
OpenStack Proposal Bot f6d3eff448 Updated from global requirements
Change-Id: I900a7010b81a3bdb336a9b0dff6578bb11340075
2016-05-19 18:46:58 +00:00
Lucian Petrut a0fd9cee37 Add method for retrieving local share paths
This will be used by Nova in order to properly handle volumes
residing on local shares.

Partial-Bug: 1580122
Change-Id: I8e4426b3b1044d24563adf7826ab9f141c2495b8
2016-05-10 13:08:45 +03:00
OpenStack Proposal Bot 9ce38cfcbb Updated from global requirements
Change-Id: Id0c1aa5644007a13700f6105d5d135d5f80c8ffa
2016-05-06 22:21:30 +00:00
Lucian Petrut 356b6cca37 Events: use tpool only if thread module is patched
At the moment, we use eventlet.tpool when waiting for events
even if the 'thread' module is not monkey patched, which causes
locking issues.

This patch changes this, checking if the 'thread' module is monkey
patched, otherwise calling the method waiting for events directly.

Related-Bug: #1568824

Change-Id: Ib752bfa2acc9f6b47996f6e949aadf20903c849b
2016-04-19 19:58:55 +00:00
Jenkins 304fec7154 Merge "Fix event listeners" 2016-04-18 09:38:07 +00:00
Lucian Petrut 53a8d6d0b3 Fix event listeners
PyMI subscribes to event providers, setting a callback that will be
invoked when an event arrives. When called, the event watcher will
block until an event is retrieved. A threading.Event is used
internally by PyMI for the event waiting workflow.

The issue is that the threading module will be monkey patched by
eventlet. The event callback is performed from a different thread, so
attempting to set the event for which the event watcher waits will
some times raise the "error: cannot switch to a different thread"
greenlet exception, thus breaking the event listener.

This issue can be fixed at the os-win level, without PyMI having to
know about eventlet monkey patching. We can make sure that PyMI uses
the unpatched threading module, also ensuring that the blocking calls
are run in a different thread, so that we don't block the calling
thread. eventlet.tpool can be used to easily achieve this.

Closes-Bug: #1568824

Change-Id: I9be6c1a1b144bdf565f25517c52439a5fb10cb51
2016-04-15 17:45:26 +03:00
OpenStack Proposal Bot 9df78ab4df Updated from global requirements
Change-Id: Ic0dc1d97c0d4ffcb037c0406f60dbc4b7fa42182
2016-04-15 01:57:25 +00:00
Alin Balutoiu c478d43a7f Adds missing attribute from get_cpus_info query
There is a new field added in cpu_info called MaxClockSpeed.
The field is not included in the query so its value will not
be retrieved with the query and it will be always None.

This patch adds the missing field in the query in order
to retrieve its value.

Closes-Bug: #1570345

Change-Id: Ie6d531ccd9fdb74c700dc6f52674d46838f5ee1a
2016-04-14 15:00:05 +03:00
Jenkins 97c1dac10c Merge "Fix retrieving VHDX block size" 2016-04-13 16:10:16 +00:00
Lucian Petrut 70d3658d26 Fix retrieving VM notes race condition
If the VM is deleted while we attempt to retrieve the VM notes, we
sometimes get a TypeError when we try to iterate over them, as the
Notes property will be set to None.

This change fixes the issue by storing this field in a different
variable, before attempting to use it.

Closes-Bug: #1569815

Change-Id: I89e73df9406a55e087751d20450e134be60867e6
2016-04-13 13:55:40 +03:00
Lucian Petrut a4e6cb7d4a Fix retrieving VHDX block size
We need the VHDX block size when retrieving the maximum internal
size of a VHDX for a specific file size.

The issue is that we rely on the virtdisk.dll API to give us this
value, while for fixed size images, the block size will always be
reported as 0.

This can easily be avoided by reintroducing the method which actually
parses the image file in order to retrieve the VHDX block size.

Closes-Bug: #1569451
Change-Id: Id035dbc070566817a60eed8270e39c52d3b54821
2016-04-12 19:37:24 +03:00
OpenStack Proposal Bot d9c2c1bf69 Updated from global requirements
Change-Id: Ifdba7af8886466b1abce2f36ee36828311e5842d
2016-04-11 18:31:19 +00:00
Lucian Petrut 47aebc1029 Fix retrieving VM physical disk mapping
When retrieving the VM 'physical' disks (host attached passthrough
disks) mapping, we attempt to retrieve the disk resource path, using
the 'Path_' method.

The issue is that when using the old WMI lib, this method is
case-insensitive, while when using PyMI, it's not.

This will raise a MI_METHOD_NOT_FOUND exception. This can easily be
fixed by using the right method name.

Change-Id: Iea2e22a67065f58a67ad1a89e6076408e5504be9
Closes-Bug: #1567916
2016-04-08 15:28:58 +03:00