diff --git a/SoftLayer/CLI/virt/power.py b/SoftLayer/CLI/virt/power.py index f3c04a9b7..20f73d04f 100644 --- a/SoftLayer/CLI/virt/power.py +++ b/SoftLayer/CLI/virt/power.py @@ -35,7 +35,7 @@ def reboot(env, identifier, hard): """Reboot an active virtual server.""" virtual_guest = env.client['Virtual_Guest'] - mgr = SoftLayer.HardwareManager(env.client) + mgr = SoftLayer.VSManager(env.client) vs_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'VS') if not (env.skip_confirmations or formatting.confirm('This will reboot the VS with id %s. ' diff --git a/SoftLayer/transports.py b/SoftLayer/transports.py index 8849a5c2f..297249852 100644 --- a/SoftLayer/transports.py +++ b/SoftLayer/transports.py @@ -9,6 +9,7 @@ import json import logging import re +from string import Template import time import xmlrpc.client @@ -256,7 +257,6 @@ def print_reproduceable(self, request): :param request request: Request object """ - from string import Template output = Template('''============= testing.py ============= import requests from requests.auth import HTTPBasicAuth diff --git a/tests/CLI/modules/autoscale_tests.py b/tests/CLI/modules/autoscale_tests.py index 9ea7ebe46..6d0e543da 100644 --- a/tests/CLI/modules/autoscale_tests.py +++ b/tests/CLI/modules/autoscale_tests.py @@ -8,6 +8,7 @@ Tests for the autoscale cli command """ import mock +import sys from SoftLayer import fixtures from SoftLayer import testing @@ -74,6 +75,9 @@ def test_autoscale_edit_userdata(self, manager): @mock.patch('SoftLayer.managers.autoscale.AutoScaleManager.edit') def test_autoscale_edit_userfile(self, manager): + # On windows, python cannot edit a NamedTemporaryFile. + if(sys.platform.startswith("win")): + self.skipTest("Test doesn't work in Windows") group = fixtures.SoftLayer_Scale_Group.getObject template = { 'virtualGuestMemberTemplate': group['virtualGuestMemberTemplate']