Merge "compute: Deprecate 'server create --file'"
This commit is contained in:
commit
979b4832dd
@ -989,8 +989,9 @@ class CreateServer(command.ShowOne):
|
||||
action='append',
|
||||
default=[],
|
||||
help=_(
|
||||
'File to inject into image before boot '
|
||||
'File(s) to inject into image before boot '
|
||||
'(repeat option to set multiple files)'
|
||||
'(supported by --os-compute-api-version 2.57 or below)'
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
@ -1201,6 +1202,15 @@ class CreateServer(command.ShowOne):
|
||||
flavor = utils.find_resource(
|
||||
compute_client.flavors, parsed_args.flavor)
|
||||
|
||||
if parsed_args.file:
|
||||
if compute_client.api_version >= api_versions.APIVersion('2.57'):
|
||||
msg = _(
|
||||
'Personality files are deprecated and are not supported '
|
||||
'for --os-compute-api-version greater than 2.56; use '
|
||||
'user data instead'
|
||||
)
|
||||
raise exceptions.CommandError(msg)
|
||||
|
||||
files = {}
|
||||
for f in parsed_args.file:
|
||||
dst, src = f.split('=', 1)
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``server create`` command will now error out if the ``--file`` option
|
||||
is specified alongside ``--os-compute-api-version`` of ``2.57`` or greater.
|
||||
This reflects the removal of this feature from the compute service in this
|
||||
microversion.
|
Loading…
Reference in New Issue
Block a user