Skip to content

Commit fdc3295

Browse files
Merge pull request #1182 from allmightyspiff/master
Fixed vs reboot unable to resolve vs names
2 parents 6b011b5 + f7c5080 commit fdc3295

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

SoftLayer/CLI/virt/power.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def reboot(env, identifier, hard):
3535
"""Reboot an active virtual server."""
3636

3737
virtual_guest = env.client['Virtual_Guest']
38-
mgr = SoftLayer.HardwareManager(env.client)
38+
mgr = SoftLayer.VSManager(env.client)
3939
vs_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'VS')
4040
if not (env.skip_confirmations or
4141
formatting.confirm('This will reboot the VS with id %s. '

SoftLayer/transports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import json
1010
import logging
1111
import re
12+
from string import Template
1213
import time
1314
import xmlrpc.client
1415

@@ -256,7 +257,6 @@ def print_reproduceable(self, request):
256257
257258
:param request request: Request object
258259
"""
259-
from string import Template
260260
output = Template('''============= testing.py =============
261261
import requests
262262
from requests.auth import HTTPBasicAuth

tests/CLI/modules/autoscale_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Tests for the autoscale cli command
99
"""
1010
import mock
11+
import sys
1112

1213
from SoftLayer import fixtures
1314
from SoftLayer import testing
@@ -74,6 +75,9 @@ def test_autoscale_edit_userdata(self, manager):
7475

7576
@mock.patch('SoftLayer.managers.autoscale.AutoScaleManager.edit')
7677
def test_autoscale_edit_userfile(self, manager):
78+
# On windows, python cannot edit a NamedTemporaryFile.
79+
if(sys.platform.startswith("win")):
80+
self.skipTest("Test doesn't work in Windows")
7781
group = fixtures.SoftLayer_Scale_Group.getObject
7882
template = {
7983
'virtualGuestMemberTemplate': group['virtualGuestMemberTemplate']

0 commit comments

Comments
 (0)