Skip to content

Commit

Permalink
Merge "Make nova CLI use term "server" where possible"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 24, 2013
2 parents 4641853 + aee366c commit 7a041f9
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 72 deletions.
72 changes: 36 additions & 36 deletions novaclient/v1_1/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
default=None,
type=int,
metavar='<number>',
help="boot multi instances at a time (limited by quota).")
help="boot multiple servers at a time (limited by quota).")
@utils.arg('--meta',
metavar="<key=value>",
action='append',
Expand Down Expand Up @@ -344,7 +344,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
@utils.arg('--availability-zone',
default=None,
metavar='<availability-zone>',
help="The availability zone for instance placement.")
help="The availability zone for server placement.")
@utils.arg('--availability_zone',
help=argparse.SUPPRESS)
@utils.arg('--security-groups',
Expand Down Expand Up @@ -414,7 +414,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
dest='poll',
action="store_true",
default=False,
help='Blocks while instance builds so progress can be reported.')
help='Blocks while server builds so progress can be reported.')
def do_boot(cs, args):
"""Boot a new server."""
boot_args, boot_kwargs = _boot(cs, args)
Expand Down Expand Up @@ -477,10 +477,10 @@ def _poll_for_status(poll_fn, obj_id, action, final_ok_states,
"""
def print_progress(progress):
if show_progress:
msg = ('\rInstance %(action)s... %(progress)s%% complete'
msg = ('\rServer %(action)s... %(progress)s%% complete'
% dict(action=action, progress=progress))
else:
msg = '\rInstance %(action)s...' % dict(action=action)
msg = '\rServer %(action)s...' % dict(action=action)

sys.stdout.write(msg)
sys.stdout.flush()
Expand All @@ -504,7 +504,7 @@ def print_progress(progress):
break
elif status == "error":
if not silent:
print("\nError %s instance" % action)
print("\nError %s server" % action)
break

if not silent:
Expand Down Expand Up @@ -1022,7 +1022,7 @@ def do_image_delete(cs, args):
dest='reservation_id',
metavar='<reservation-id>',
default=None,
help='Only return instances that match reservation-id.')
help='Only return servers that match reservation-id.')
@utils.arg('--reservation_id',
help=argparse.SUPPRESS)
@utils.arg('--ip',
Expand All @@ -1044,7 +1044,7 @@ def do_image_delete(cs, args):
dest='instance_name',
metavar='<name-regexp>',
default=None,
help='Search with regular expression match by instance name (Admin only).')
help='Search with regular expression match by server name (Admin only).')
@utils.arg('--instance_name',
help=argparse.SUPPRESS)
@utils.arg('--status',
Expand All @@ -1066,7 +1066,7 @@ def do_image_delete(cs, args):
dest='host',
metavar='<hostname>',
default=None,
help='Search instances by hostname to which they are assigned '
help='Search servers by hostname to which they are assigned '
'(Admin only).')
@utils.arg('--all-tenants',
dest='all_tenants',
Expand Down Expand Up @@ -1174,7 +1174,7 @@ def do_list(cs, args):
dest='poll',
action="store_true",
default=False,
help='Blocks while instance is rebooting.')
help='Blocks while server is rebooting.')
def do_reboot(cs, args):
"""Reboot a server."""
server = _find_server(cs, args.server)
Expand All @@ -1191,19 +1191,19 @@ def do_reboot(cs, args):
dest='rebuild_password',
metavar='<rebuild-password>',
default=False,
help="Set the provided password on the rebuild instance.")
help="Set the provided password on the rebuild server.")
@utils.arg('--rebuild_password',
help=argparse.SUPPRESS)
@utils.arg('--poll',
dest='poll',
action="store_true",
default=False,
help='Blocks while instance rebuilds so progress can be reported.')
help='Blocks while server rebuilds so progress can be reported.')
@utils.arg('--minimal',
dest='minimal',
action="store_true",
default=False,
help='Skips flavor/image lookups when showing instances')
help='Skips flavor/image lookups when showing servers')
def do_rebuild(cs, args):
"""Shutdown, re-image, and re-boot a server."""
server = _find_server(cs, args.server)
Expand Down Expand Up @@ -1236,7 +1236,7 @@ def do_rename(cs, args):
dest='poll',
action="store_true",
default=False,
help='Blocks while instance resizes so progress can be reported.')
help='Blocks while servers resizes so progress can be reported.')
def do_resize(cs, args):
"""Resize a server."""
server = _find_server(cs, args.server)
Expand Down Expand Up @@ -1265,7 +1265,7 @@ def do_resize_revert(cs, args):
dest='poll',
action="store_true",
default=False,
help='Blocks while instance migrates so progress can be reported.')
help='Blocks while server migrates so progress can be reported.')
def do_migrate(cs, args):
"""Migrate a server. The new host will be selected by the scheduler."""
server = _find_server(cs, args.server)
Expand Down Expand Up @@ -1362,7 +1362,7 @@ def do_root_password(cs, args):
dest='poll',
action="store_true",
default=False,
help='Blocks while instance snapshots so progress can be reported.')
help='Blocks while server snapshots so progress can be reported.')
def do_image_create(cs, args):
"""Create a new image by taking a snapshot of a running server."""
server = _find_server(cs, args.server)
Expand Down Expand Up @@ -1395,7 +1395,7 @@ def do_image_create(cs, args):
@utils.arg('rotation', metavar='<rotation>',
help='Int parameter representing how many backups to keep around.')
def do_backup(cs, args):
"""Backup a instance by create a 'backup' type snapshot."""
"""Backup a server by creating a 'backup' type snapshot."""
_find_server(cs, args.server).backup(args.name,
args.backup_type,
args.rotation)
Expand Down Expand Up @@ -1470,7 +1470,7 @@ def _print_server(cs, args):
dest='minimal',
action="store_true",
default=False,
help='Skips flavor/image lookups when showing instances')
help='Skips flavor/image lookups when showing servers')
@utils.arg('server', metavar='<server>', help='Name or ID of server.')
def do_show(cs, args):
"""Show details about the given server."""
Expand Down Expand Up @@ -1742,7 +1742,7 @@ def do_volume_snapshot_show(cs, args):
@utils.arg('--force',
metavar='<True|False>',
help='Optional flag to indicate whether to snapshot a volume even if its '
'attached to an instance. (Default=False)',
'attached to a server. (Default=False)',
default=False)
@utils.arg('--display-name',
metavar='<display-name>',
Expand Down Expand Up @@ -1859,7 +1859,7 @@ def do_clear_password(cs, args):


def _print_floating_ip_list(floating_ips):
utils.print_list(floating_ips, ['Ip', 'Instance Id', 'Fixed Ip', 'Pool'])
utils.print_list(floating_ips, ['Ip', 'Server Id', 'Fixed Ip', 'Pool'])


@utils.arg('server', metavar='<server>', help='Name or ID of server.')
Expand Down Expand Up @@ -2033,7 +2033,7 @@ def do_dns_delete_domain(cs, args):
@utils.arg('--availability-zone',
metavar='<availability-zone>',
default=None,
help='Limit access to this domain to instances '
help='Limit access to this domain to servers '
'in the specified availability zone.')
@utils.arg('--availability_zone',
help=argparse.SUPPRESS)
Expand Down Expand Up @@ -2305,7 +2305,7 @@ def do_secgroup_delete_group_rule(cs, args):
@utils.arg('--pub_key',
help=argparse.SUPPRESS)
def do_keypair_add(cs, args):
"""Create a new key pair for use with instances."""
"""Create a new key pair for use with servers."""
name = args.name
pub_key = args.pub_key

Expand Down Expand Up @@ -2388,7 +2388,7 @@ def do_rate_limits(cs, args):
def do_usage_list(cs, args):
"""List usage data for all tenants."""
dateformat = "%Y-%m-%d"
rows = ["Tenant ID", "Instances", "RAM MB-Hours", "CPU Hours",
rows = ["Tenant ID", "Servers", "RAM MB-Hours", "CPU Hours",
"Disk GB-Hours"]

now = timeutils.utcnow()
Expand Down Expand Up @@ -2435,7 +2435,7 @@ def simplify_usage(u):
def do_usage(cs, args):
"""Show usage data for a single tenant."""
dateformat = "%Y-%m-%d"
rows = ["Instances", "RAM MB-Hours", "CPU Hours", "Disk GB-Hours"]
rows = ["Servers", "RAM MB-Hours", "CPU Hours", "Disk GB-Hours"]

now = timeutils.utcnow()

Expand Down Expand Up @@ -2691,7 +2691,7 @@ def _print_aggregate_details(aggregate):
action='store_true',
help=argparse.SUPPRESS)
def do_live_migration(cs, args):
"""Migrate running instance to a new machine."""
"""Migrate running server to a new machine."""
_find_server(cs, args.server).live_migrate(args.host,
args.block_migrate,
args.disk_over_commit)
Expand All @@ -2700,16 +2700,16 @@ def do_live_migration(cs, args):
@utils.arg('server', metavar='<server>', help='Name or ID of server.')
@utils.arg('--active', action='store_const', dest='state',
default='error', const='active',
help='Request the instance be reset to "active" state instead '
help='Request the server be reset to "active" state instead '
'of "error" state (the default).')
def do_reset_state(cs, args):
"""Reset the state of an instance."""
"""Reset the state of a server."""
_find_server(cs, args.server).reset_state(args.state)


@utils.arg('server', metavar='<server>', help='Name or ID of server.')
def do_reset_network(cs, args):
"""Reset network of an instance."""
"""Reset network of a server."""
_find_server(cs, args.server).reset_network()


Expand Down Expand Up @@ -2885,7 +2885,7 @@ def do_hypervisor_list(cs, args):
@utils.arg('hostname', metavar='<hostname>',
help='The hypervisor hostname (or pattern) to search for.')
def do_hypervisor_servers(cs, args):
"""List instances belonging to specific hypervisors."""
"""List servers belonging to specific hypervisors."""
hypers = cs.hypervisors.search(args.hostname, servers=True)

class InstanceOnHyper(object):
Expand Down Expand Up @@ -2983,13 +2983,13 @@ def do_credentials(cs, _args):
action='store_true',
default=False,
help='Optional flag to indicate whether to use private address '
'attached to an instance. (Default=False)')
'attached to a server. (Default=False)')
@utils.arg('--ipv6',
dest='ipv6',
action='store_true',
default=False,
help='Optional flag to indicate whether to use an IPv6 address '
'attached to an instance. (Defaults to IPv4 address)')
'attached to a server. (Defaults to IPv4 address)')
@utils.arg('--login', metavar='<login>', help='Login to use.', default="root")
@utils.arg('-i', '--identity',
dest='identity',
Expand Down Expand Up @@ -3308,13 +3308,13 @@ def do_quota_class_update(cs, args):
dest='password',
metavar='<password>',
default=None,
help="Set the provided password on the evacuated instance. Not applicable "
help="Set the provided password on the evacuated server. Not applicable "
"with on-shared-storage flag")
@utils.arg('--on-shared-storage',
dest='on_shared_storage',
action="store_true",
default=False,
help='Specifies whether instance files located on shared storage')
help='Specifies whether server files are located on shared storage')
def do_evacuate(cs, args):
"""Evacuate server from failed host to specified one."""
server = _find_server(cs, args.server)
Expand All @@ -3341,7 +3341,7 @@ def __init__(self, interface):

@utils.arg('server', metavar='<server>', help='Name or ID of server.')
def do_interface_list(cs, args):
"""List interfaces attached to an instance."""
"""List interfaces attached to a server."""
server = _find_server(cs, args.server)

res = server.interface_list()
Expand All @@ -3356,7 +3356,7 @@ def do_interface_list(cs, args):
@utils.arg('--fixed-ip', metavar='<fixed_ip>', help='Requested fixed IP.',
default=None, dest="fixed_ip")
def do_interface_attach(cs, args):
"""Attach a network interface to an instance."""
"""Attach a network interface to a server."""
server = _find_server(cs, args.server)

res = server.interface_attach(args.port_id, args.net_id, args.fixed_ip)
Expand All @@ -3367,7 +3367,7 @@ def do_interface_attach(cs, args):
@utils.arg('server', metavar='<server>', help='Name or ID of server.')
@utils.arg('port_id', metavar='<port_id>', help='Port ID.')
def do_interface_detach(cs, args):
"""Detach a network interface from an instance."""
"""Detach a network interface from a server."""
server = _find_server(cs, args.server)

res = server.interface_detach(args.port_id)
Expand Down

0 comments on commit 7a041f9

Please sign in to comment.