Skip to content

Commit

Permalink
Merge pull request #546 from Neetuj/master
Browse files Browse the repository at this point in the history
    pass the environment variable to 'slcli vs ready' #545
  • Loading branch information
sudorandom committed May 7, 2015
2 parents 7155a4a + fe5dc14 commit efb3865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SoftLayer/CLI/virt/ready.py
Expand Up @@ -2,6 +2,7 @@
# :license: MIT, see LICENSE for more details.

import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import helpers

Expand All @@ -11,14 +12,13 @@
@click.command()
@click.argument('identifier')
@click.option('--wait', default=0, type=click.INT, help="Name of the image")
@environment.pass_env
def cli(env, identifier, wait):
"""Check if a virtual server is ready."""

vsi = SoftLayer.VSManager(env.client)

vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS')
ready = vsi.wait_for_ready(vs_id, wait)

if ready:
return "READY"
else:
Expand Down

0 comments on commit efb3865

Please sign in to comment.