Rename all instances of 'metadata' to 'property'.
Change-Id: I454cbe685dc5afa0a09ecc976a90d6eb6bc57d14
This commit is contained in:
parent
53bbff67eb
commit
a2e3a16221
@ -149,11 +149,11 @@ class CreateServer(show.ShowOne):
|
||||
metavar='<key-name>',
|
||||
help='Keypair to inject into this server (optional extension)')
|
||||
parser.add_argument(
|
||||
'--metadata',
|
||||
'--property',
|
||||
metavar='<key=value>',
|
||||
action='append',
|
||||
default=[],
|
||||
help='Metadata to store for this server '
|
||||
help='Property to store for this server '
|
||||
'(repeat for multiple values)')
|
||||
parser.add_argument(
|
||||
'--file',
|
||||
@ -229,7 +229,7 @@ class CreateServer(show.ShowOne):
|
||||
|
||||
boot_args = [parsed_args.server_name, image, flavor]
|
||||
|
||||
meta = dict(v.split('=', 1) for v in parsed_args.metadata)
|
||||
meta = dict(v.split('=', 1) for v in parsed_args.property)
|
||||
|
||||
files = {}
|
||||
for f in parsed_args.file:
|
||||
|
@ -92,11 +92,11 @@ class CreateImage(show.ShowOne):
|
||||
help="Similar to --location, but this indicates that the image"
|
||||
" should immediately be copied from the data store.")
|
||||
parser.add_argument(
|
||||
"--metadata",
|
||||
"--property",
|
||||
metavar="<key=value>",
|
||||
default=[],
|
||||
action="append",
|
||||
help="Arbitrary metadata to associate with image.")
|
||||
help="Arbitrary property to associate with image.")
|
||||
protected_group = parser.add_mutually_exclusive_group()
|
||||
protected_group.add_argument(
|
||||
"--protected",
|
||||
@ -136,8 +136,8 @@ class CreateImage(show.ShowOne):
|
||||
args.pop("variables")
|
||||
|
||||
args["properties"] = {}
|
||||
for _metadata in args.pop("metadata"):
|
||||
key, value = _metadata.split("=", 1)
|
||||
for _property in args.pop("property"):
|
||||
key, value = _property.split("=", 1)
|
||||
args["properties"][key] = value
|
||||
|
||||
if "location" not in args and "copy_from" not in args:
|
||||
|
@ -76,9 +76,9 @@ class CreateVolume(show.ShowOne):
|
||||
help='Availability Zone to use',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--meta-data',
|
||||
'--property',
|
||||
metavar='<key=value>',
|
||||
help='Optional metadata to set on volume creation',
|
||||
help='Optional property to set on volume creation',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--image-ref',
|
||||
@ -242,8 +242,8 @@ class SetVolume(command.Command):
|
||||
volume = utils.find_resource(volume_client.volumes, parsed_args.volume)
|
||||
|
||||
meta = None
|
||||
if parsed_args.meta_data:
|
||||
meta = dict(v.split('=') for v in parsed_args.meta_data.split(' '))
|
||||
if parsed_args.property:
|
||||
meta = dict(v.split('=') for v in parsed_args.property.split(' '))
|
||||
volume_client.volumes.set_metadata(volume.id, meta)
|
||||
|
||||
kwargs = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user