Remove windows support from Nova driver
The windows support was added to nova-docker in before [1]. However, it seems the Zun team doesn't have an maintainer of codes in this part, so let's remove it for now. [1] https://review.openstack.org/#/c/219657/ Change-Id: I7f7de5ea920b69e6a79d624ae7e0e0f79e69853c
This commit is contained in:
parent
ae950b3478
commit
c419ebe0cf
@ -212,9 +212,6 @@ class DockerDriver(driver.ComputeDriver):
|
||||
if not network_info:
|
||||
return
|
||||
|
||||
if os.name == 'nt':
|
||||
return
|
||||
|
||||
container_id = self._get_container_id(instance)
|
||||
if not container_id:
|
||||
raise exception.InstanceNotFound(instance_id=instance['name'])
|
||||
|
@ -13,8 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_log import log
|
||||
|
||||
@ -27,9 +25,6 @@ LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
def teardown_network(container_id):
|
||||
if os.name == 'nt':
|
||||
return
|
||||
|
||||
try:
|
||||
output, err = utils.execute('ip', '-o', 'netns', 'list')
|
||||
for line in output.split('\n'):
|
||||
|
@ -65,15 +65,10 @@ class DockerGenericVIFDriver(object):
|
||||
self.plug_midonet(instance, vif)
|
||||
elif vif_type == network_model.VIF_TYPE_IOVISOR:
|
||||
self.plug_iovisor(instance, vif)
|
||||
elif vif_type == 'hyperv':
|
||||
self.plug_windows(instance, vif)
|
||||
else:
|
||||
raise exception.NovaException(
|
||||
_("Unexpected vif_type=%s") % vif_type)
|
||||
|
||||
def plug_windows(self, instance, vif):
|
||||
pass
|
||||
|
||||
def plug_iovisor(self, instance, vif):
|
||||
"""Plug docker vif into IOvisor
|
||||
|
||||
@ -337,15 +332,10 @@ class DockerGenericVIFDriver(object):
|
||||
self.unplug_midonet(instance, vif)
|
||||
elif vif_type == network_model.VIF_TYPE_IOVISOR:
|
||||
self.unplug_iovisor(instance, vif)
|
||||
elif vif_type == 'hyperv':
|
||||
self.unplug_windows(instance, vif)
|
||||
else:
|
||||
raise exception.NovaException(
|
||||
_("Unexpected vif_type=%s") % vif_type)
|
||||
|
||||
def unplug_windows(self, instance, vif):
|
||||
pass
|
||||
|
||||
def unplug_iovisor(self, instance, vif):
|
||||
"""Unplug vif from IOvisor
|
||||
|
||||
|
@ -13,23 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
import ctypes
|
||||
import datetime
|
||||
import os
|
||||
import time
|
||||
|
||||
from nova import utils
|
||||
|
||||
|
||||
def sys_uptime():
|
||||
"""Returns the host uptime."""
|
||||
|
||||
if os.name == 'nt':
|
||||
tick_count64 = ctypes.windll.kernel32.GetTickCount64()
|
||||
return ("%s up %s, 0 users, load average: 0, 0, 0" %
|
||||
(str(time.strftime("%H:%M:%S")),
|
||||
str(datetime.timedelta(milliseconds=long(tick_count64)))))
|
||||
else:
|
||||
out, err = utils.execute('env', 'LANG=C', 'uptime')
|
||||
return out
|
||||
out, err = utils.execute('env', 'LANG=C', 'uptime')
|
||||
return out
|
||||
|
Loading…
Reference in New Issue
Block a user