Merge "Add support for specifing patitions when claming a server"
This commit is contained in:
commit
9b8932d9cc
@ -147,6 +147,14 @@ class CreateServer(command.ShowOne):
|
||||
help=_('Set a property on this server '
|
||||
'(repeat option to set multiple values)'),
|
||||
)
|
||||
parser.add_argument(
|
||||
'--partition',
|
||||
metavar='<key=value>',
|
||||
action=parseractions.KeyValueAction,
|
||||
help=_('Create a partition on the root disk of this server, '
|
||||
'only root_gb(required), ephemeral_gb, and swap_mb allowed '
|
||||
'(repeat option to set multiple partitions)'),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--min",
|
||||
metavar='<count>',
|
||||
@ -231,6 +239,7 @@ class CreateServer(command.ShowOne):
|
||||
files=files,
|
||||
key_name=parsed_args.key_name,
|
||||
metadata=parsed_args.property,
|
||||
partitions=parsed_args.partition,
|
||||
min_count=parsed_args.min,
|
||||
max_count=parsed_args.max,
|
||||
hint=parsed_args.hint
|
||||
|
@ -31,7 +31,7 @@ class ServerManager(base.ManagerWithFind):
|
||||
def create(self, name, image_uuid, flavor_uuid, networks,
|
||||
description=None, availability_zone=None, metadata=None,
|
||||
userdata=None, files=None, key_name=None, min_count=None,
|
||||
max_count=None, hint=None):
|
||||
max_count=None, hint=None, partitions=None):
|
||||
url = '/servers'
|
||||
server = {
|
||||
'name': name,
|
||||
@ -90,6 +90,8 @@ class ServerManager(base.ManagerWithFind):
|
||||
server['key_name'] = key_name
|
||||
if metadata is not None:
|
||||
server['metadata'] = metadata
|
||||
if partitions is not None:
|
||||
server['partitions'] = partitions
|
||||
if min_count is not None:
|
||||
server['min_count'] = min_count
|
||||
if max_count is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user