Browse Source

Remove experimental flag from share groups commands

- Removed all experimental mentions from share group feature
  commands.

Depends-On: I080683541d527657f01008d43529fc53c19a09cd
Change-Id: I585c9c845851fcd581e08b0084fc2528b85cd632
Partially-Implements: bp graduate-share-groups-feature
tags/2.1.0^0
silvacarloss 4 months ago
parent
commit
3371c54303
8 changed files with 243 additions and 84 deletions
  1. +1
    -1
      manilaclient/api_versions.py
  2. +1
    -1
      manilaclient/osc/v2/share.py
  3. +68
    -14
      manilaclient/v2/share_group_snapshots.py
  4. +28
    -5
      manilaclient/v2/share_group_type_access.py
  5. +41
    -9
      manilaclient/v2/share_group_types.py
  6. +78
    -17
      manilaclient/v2/share_groups.py
  7. +16
    -37
      manilaclient/v2/shell.py
  8. +10
    -0
      releasenotes/notes/remove-experimental-flag-from-share-groups-feature-dcf2b0b67fe4cac4.yaml

+ 1
- 1
manilaclient/api_versions.py View File

@@ -27,7 +27,7 @@ from manilaclient import utils

LOG = logging.getLogger(__name__)

MAX_VERSION = '2.54'
MAX_VERSION = '2.55'
MIN_VERSION = '2.0'
DEPRECATED_VERSION = '1.0'
_VERSIONED_METHOD_MAP = {}


+ 1
- 1
manilaclient/osc/v2/share.py View File

@@ -170,7 +170,7 @@ class CreateShare(command.ShowOne):
metavar='<share-group>',
default=None,
help=_('Optional share group name or ID in which to create '
'the share. (Experimental, Default=None).')
'the share. (Default=None).')
)
return parser



+ 68
- 14
manilaclient/v2/share_group_snapshots.py View File

@@ -24,6 +24,7 @@ RESOURCE_PATH = '/share-group-snapshots/%s'
RESOURCE_PATH_ACTION = '/share-group-snapshots/%s/action'
RESOURCES_NAME = 'share_group_snapshots'
RESOURCE_NAME = 'share_group_snapshot'
SG_GRADUATION_VERSION = "2.55"


class ShareGroupSnapshot(common_base.Resource):
@@ -49,9 +50,8 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):
"""Manage :class:`ShareGroupSnapshot` resources."""
resource_class = ShareGroupSnapshot

@api_versions.wraps("2.31")
@api_versions.experimental_api
def create(self, share_group, name=None, description=None):
def _create_share_group_snapshot(self, share_group, name=None,
description=None):
"""Create a share group snapshot.

:param share_group: either ShareGroup object or text with its UUID
@@ -69,9 +69,18 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):
return self._create(
RESOURCES_PATH, {RESOURCE_NAME: body}, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def get(self, share_group_snapshot):
def create(self, share_group, name=None, description=None):
return self._create_share_group_snapshot(share_group, name,
description)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def create(self, share_group, name=None, description=None):
return self._create_share_group_snapshot(share_group, name,
description)

def _get_share_group_snapshot(self, share_group_snapshot):
"""Get a share group snapshot.

:param share_group_snapshot: either share group snapshot object or text
@@ -82,10 +91,17 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):
url = RESOURCE_PATH % share_group_snapshot_id
return self._get(url, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
def get(self, share_group_snapshot):
return self._get_share_group_snapshot(share_group_snapshot)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def get(self, share_group_snapshot):
return self._get_share_group_snapshot(share_group_snapshot)

def _list_share_group_snapshots(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
"""Get a list of all share group snapshots.

:param detailed: Whether to return detailed snapshot info or not.
@@ -129,9 +145,22 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):

return self._list(url, RESOURCES_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def update(self, share_group_snapshot, **kwargs):
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
return self._list_share_group_snapshots(
detailed=detailed, search_opts=search_opts,
sort_key=sort_key, sort_dir=sort_dir)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
return self._list_share_group_snapshots(
detailed=detailed, search_opts=search_opts,
sort_key=sort_key, sort_dir=sort_dir)

def _update_share_group_snapshot(self, share_group_snapshot, **kwargs):
"""Updates a share group snapshot.

:param share_group_snapshot: either ShareGroupSnapshot object or text
@@ -146,9 +175,18 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):
body = {RESOURCE_NAME: kwargs}
return self._update(url, body, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def delete(self, share_group_snapshot, force=False):
def update(self, share_group_snapshot, **kwargs):
return self._update_share_group_snapshot(share_group_snapshot,
**kwargs)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def update(self, share_group_snapshot, **kwargs):
return self._update_share_group_snapshot(share_group_snapshot,
**kwargs)

def _delete_share_group_snapshot(self, share_group_snapshot, force=False):
"""Delete a share group snapshot.

:param share_group_snapshot: either ShareGroupSnapshot object or text
@@ -164,9 +202,16 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):
url = RESOURCE_PATH % share_group_snapshot_id
self._delete(url)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def reset_state(self, share_group_snapshot, state):
def delete(self, share_group_snapshot, force=False):
self._delete_share_group_snapshot(share_group_snapshot, force=force)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def delete(self, share_group_snapshot, force=False):
self._delete_share_group_snapshot(share_group_snapshot, force=force)

def _share_group_snapshot_reset_state(self, share_group_snapshot, state):
"""Update the specified share group snapshot.

:param share_group_snapshot: either ShareGroupSnapshot object or text
@@ -177,3 +222,12 @@ class ShareGroupSnapshotManager(base.ManagerWithFind):
url = RESOURCE_PATH_ACTION % share_group_snapshot_id
body = {'reset_status': {'status': state}}
self.api.client.post(url, body=body)

@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def reset_state(self, share_group_snapshot, state):
self._share_group_snapshot_reset_state(share_group_snapshot, state)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def reset_state(self, share_group_snapshot, state):
self._share_group_snapshot_reset_state(share_group_snapshot, state)

+ 28
- 5
manilaclient/v2/share_group_type_access.py View File

@@ -21,6 +21,7 @@ RESOURCES_PATH = '/share-group-types'
RESOURCE_PATH = '/share-group-types/%s/access'
RESOURCE_PATH_ACTION = '/share-group-types/%s/action'
RESOURCE_NAME = 'share_group_type_access'
SG_GRADUATION_VERSION = "2.55"


class ShareGroupTypeAccess(common_base.Resource):
@@ -32,29 +33,51 @@ class ShareGroupTypeAccessManager(base.ManagerWithFind):
"""Manage :class:`ShareGroupTypeAccess` resources."""
resource_class = ShareGroupTypeAccess

@api_versions.wraps("2.31")
@api_versions.experimental_api
def list(self, share_group_type, search_opts=None):
def _list_share_group_type_access(self, share_group_type,
search_opts=None):
if share_group_type.is_public:
return None
share_group_type_id = common_base.getid(share_group_type)
url = RESOURCE_PATH % share_group_type_id
return self._list(url, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def list(self, share_group_type, search_opts=None):
return self._list_share_group_type_access(share_group_type,
search_opts)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def list(self, share_group_type, search_opts=None):
return self._list_share_group_type_access(share_group_type,
search_opts)

@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def add_project_access(self, share_group_type, project):
"""Add a project to the given share group type access list."""
info = {'project': project}
self._action('addProjectAccess', share_group_type, info)

@api_versions.wraps("2.31")
@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def add_project_access(self, share_group_type, project):
"""Add a project to the given share group type access list."""
info = {'project': project}
self._action('addProjectAccess', share_group_type, info)

@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def remove_project_access(self, share_group_type, project):
"""Remove a project from the given share group type access list."""
info = {'project': project}
self._action('removeProjectAccess', share_group_type, info)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def remove_project_access(self, share_group_type, project):
"""Remove a project from the given share group type access list."""
info = {'project': project}
self._action('removeProjectAccess', share_group_type, info)

def _action(self, action, share_group_type, info, **kwargs):
"""Perform a share group type action."""
body = {action: info}


+ 41
- 9
manilaclient/v2/share_group_types.py View File

@@ -27,6 +27,7 @@ RESOURCE_NAME = 'share_group_type'
GROUP_SPECS_RESOURCES_PATH = '/share-group-types/%s/group-specs'
GROUP_SPECS_RESOURCE_PATH = '/share-group-types/%s/group-specs/%s'
GROUP_SPECS_RESOURCES_NAME = 'group_specs'
SG_GRADUATION_VERSION = "2.55"


class ShareGroupType(common_base.Resource):
@@ -91,9 +92,8 @@ class ShareGroupTypeManager(base.ManagerWithFind):
"""Manage :class:`ShareGroupType` resources."""
resource_class = ShareGroupType

@api_versions.wraps("2.31")
@api_versions.experimental_api
def create(self, name, share_types, is_public=False, group_specs=None):
def _create_share_group_type(self, name, share_types, is_public=False,
group_specs=None):
"""Create a share group type.

:param name: Descriptive name of the share group type
@@ -116,9 +116,18 @@ class ShareGroupTypeManager(base.ManagerWithFind):
return self._create(
RESOURCES_PATH, {RESOURCE_NAME: body}, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def get(self, share_group_type="default"):
def create(self, name, share_types, is_public=False, group_specs=None):
return self._create_share_group_type(name, share_types, is_public,
group_specs)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def create(self, name, share_types, is_public=False, group_specs=None):
return self._create_share_group_type(name, share_types, is_public,
group_specs)

def _get_share_group_type(self, share_group_type="default"):
"""Get a specific share group type.

:param share_group_type: either instance of ShareGroupType, or text
@@ -129,9 +138,16 @@ class ShareGroupTypeManager(base.ManagerWithFind):
url = RESOURCE_PATH % share_group_type_id
return self._get(url, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def list(self, show_all=True, search_opts=None):
def get(self, share_group_type="default"):
return self._get_share_group_type(share_group_type)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def get(self, share_group_type="default"):
return self._get_share_group_type(share_group_type)

def _list_share_group_types(self, show_all=True, search_opts=None):
"""Get a list of all share group types.

:rtype: list of :class:`ShareGroupType`.
@@ -140,9 +156,16 @@ class ShareGroupTypeManager(base.ManagerWithFind):
url = RESOURCES_PATH + query_string
return self._list(url, RESOURCES_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def delete(self, share_group_type):
def list(self, show_all=True, search_opts=None):
return self._list_share_group_types(show_all, search_opts)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def list(self, show_all=True, search_opts=None):
return self._list_share_group_types(show_all, search_opts)

def _delete_share_group_type(self, share_group_type):
"""Delete a specific share group type.

:param share_group_type: either instance of ShareGroupType, or text
@@ -151,3 +174,12 @@ class ShareGroupTypeManager(base.ManagerWithFind):
share_group_type_id = common_base.getid(share_group_type)
url = RESOURCE_PATH % share_group_type_id
self._delete(url)

@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def delete(self, share_group_type):
self._delete_share_group_type(share_group_type)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def delete(self, share_group_type):
self._delete_share_group_type(share_group_type)

+ 78
- 17
manilaclient/v2/share_groups.py View File

@@ -25,6 +25,7 @@ RESOURCE_PATH = '/share-groups/%s'
RESOURCE_PATH_ACTION = '/share-groups/%s/action'
RESOURCES_NAME = 'share_groups'
RESOURCE_NAME = 'share_group'
SG_GRADUATION_VERSION = "2.55"


class ShareGroup(common_base.Resource):
@@ -50,11 +51,10 @@ class ShareGroupManager(base.ManagerWithFind):
"""Manage :class:`ShareGroup` resources."""
resource_class = ShareGroup

@api_versions.wraps("2.31")
@api_versions.experimental_api
def create(self, share_group_type=None, share_types=None,
share_network=None, name=None, description=None,
source_share_group_snapshot=None, availability_zone=None):
def _create_share_group(
self, share_group_type=None, share_types=None, share_network=None,
name=None, description=None, source_share_group_snapshot=None,
availability_zone=None):
"""Create a Share Group.

:param share_group_type: either instance of ShareGroupType or text
@@ -102,9 +102,28 @@ class ShareGroupManager(base.ManagerWithFind):
return self._create(
RESOURCES_PATH, {RESOURCE_NAME: body}, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def get(self, share_group):
def create(self, share_group_type=None, share_types=None,
share_network=None, name=None, description=None,
source_share_group_snapshot=None, availability_zone=None):
return self._create_share_group(
share_group_type=share_group_type, share_types=share_types,
share_network=share_network, name=name, description=description,
source_share_group_snapshot=source_share_group_snapshot,
availability_zone=availability_zone)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def create(self, share_group_type=None, share_types=None,
share_network=None, name=None, description=None,
source_share_group_snapshot=None, availability_zone=None):
return self._create_share_group(
share_group_type=share_group_type, share_types=share_types,
share_network=share_network, name=name, description=description,
source_share_group_snapshot=source_share_group_snapshot,
availability_zone=availability_zone)

def _get_share_group(self, share_group):
"""Get a share group.

:param share_group: either ShareGroup object or text with its UUID
@@ -114,10 +133,17 @@ class ShareGroupManager(base.ManagerWithFind):
url = RESOURCE_PATH % share_group_id
return self._get(url, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
def get(self, share_group):
return self._get_share_group(share_group)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def get(self, share_group):
return self._get_share_group(share_group)

def _list_share_groups(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
"""Get a list of all share groups.

:param detailed: Whether to return detailed share group info or not.
@@ -170,9 +196,22 @@ class ShareGroupManager(base.ManagerWithFind):

return self._list(url, RESOURCES_NAME)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def update(self, share_group, **kwargs):
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
return self._list_share_groups(
detailed=detailed, search_opts=search_opts,
sort_key=sort_key, sort_dir=sort_dir)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def list(self, detailed=True, search_opts=None,
sort_key=None, sort_dir=None):
return self._list_share_groups(
detailed=detailed, search_opts=search_opts, sort_key=sort_key,
sort_dir=sort_dir)

def _update_share_group(self, share_group, **kwargs):
"""Updates a share group.

:param share_group: either ShareGroup object or text with its UUID
@@ -186,9 +225,15 @@ class ShareGroupManager(base.ManagerWithFind):
body = {RESOURCE_NAME: kwargs}
return self._update(url, body, RESOURCE_NAME)

@api_versions.wraps("2.31")
@api_versions.experimental_api
def delete(self, share_group, force=False):
@api_versions.wraps("2.31", "2.54")
def update(self, share_group, **kwargs):
return self._update_share_group(share_group, **kwargs)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def update(self, share_group, **kwargs):
return self._update_share_group(share_group, **kwargs)

def _delete_share_group(self, share_group, force=False):
"""Delete a share group.

:param share_group: either ShareGroup object or text with its UUID
@@ -203,9 +248,16 @@ class ShareGroupManager(base.ManagerWithFind):
url = RESOURCE_PATH % share_group_id
self._delete(url)

@api_versions.wraps("2.31")
@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def reset_state(self, share_group, state):
def delete(self, share_group, force=False):
self._delete_share_group(share_group, force=force)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def delete(self, share_group, force=False):
self._delete_share_group(share_group, force=force)

def _share_group_reset_state(self, share_group, state):
"""Update the specified share group with the provided state.

:param share_group: either ShareGroup object or text with its UUID
@@ -216,3 +268,12 @@ class ShareGroupManager(base.ManagerWithFind):
url = RESOURCE_PATH_ACTION % share_group_id
body = {'reset_status': {'status': state}}
self.api.client.post(url, body=body)

@api_versions.wraps("2.31", "2.54")
@api_versions.experimental_api
def reset_state(self, share_group, state):
self._share_group_reset_state(share_group, state)

@api_versions.wraps(SG_GRADUATION_VERSION) # noqa
def reset_state(self, share_group, state):
self._share_group_reset_state(share_group, state)

+ 16
- 37
manilaclient/v2/shell.py View File

@@ -200,7 +200,6 @@ def _print_share_replica(cs, replica):
cliutils.print_dict(info)


@api_versions.experimental_api
@api_versions.wraps("2.31")
def _find_share_group(cs, share_group):
"""Get a share group ID."""
@@ -217,7 +216,6 @@ def _print_share_group(cs, share_group):
cliutils.print_dict(info)


@api_versions.experimental_api
@api_versions.wraps("2.31")
def _find_share_group_snapshot(cs, share_group_snapshot):
"""Get a share group snapshot by name or ID."""
@@ -802,7 +800,7 @@ def do_rate_limits(cs, args):
metavar='<share-group>',
action='single_alias',
help='Optional share group name or ID in which to create the share '
'(Experimental, Default=None).',
'(Default=None).',
default=None)
@cliutils.service_type('sharev2')
def do_create(cs, args):
@@ -1380,7 +1378,7 @@ def do_revert_to_snapshot(cs, args):
metavar='<share-group>',
action='single_alias',
help='Optional share group name or ID which contains the share '
'(Experimental, Default=None).',
'(Default=None).',
default=None)
@cliutils.service_type('sharev2')
def do_delete(cs, args):
@@ -1869,8 +1867,7 @@ def do_snapshot_access_list(cs, args):
type=str,
default=None,
action='single_alias',
help='Filter results by share group name or ID (Experimental, '
'Default=None).')
help='Filter results by share group name or ID (Default=None).')
@cliutils.arg(
'--columns',
metavar='<columns>',
@@ -4524,7 +4521,6 @@ def _find_share_group_type(cs, sg_type):
help='Comma separated list of columns to be displayed '
'example --columns "id,name".')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_type_list(cs, args):
"""Print a list of available 'share group types'."""

@@ -4548,7 +4544,6 @@ def do_share_group_type_list(cs, args):
help='Comma separated list of columns to be displayed '
'example --columns "id,name".')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_type_specs_list(cs, args):
"""Print a list of 'share group types specs' (Admin Only)."""

@@ -4583,7 +4578,6 @@ def do_share_group_type_specs_list(cs, args):
'OPTIONAL: Default=None. '
'Example: "--group-specs consistent_snapshot_support=host".',)
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_type_create(cs, args):
"""Create a new share group type (Admin only)."""

@@ -4607,7 +4601,6 @@ def do_share_group_type_create(cs, args):
metavar='<id>',
help="Name or ID of the share group type to delete.")
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_type_delete(cs, args):
"""Delete a specific share group type (Admin only)."""
share_group_type = _find_share_group_type(cs, args.id)
@@ -4630,7 +4623,6 @@ def do_share_group_type_delete(cs, args):
default=None,
help='Group specs to set or unset (key is only necessary on unset).')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_type_key(cs, args):
"""Set or unset group_spec for a share group type (Admin only)."""
sg_type = _find_share_group_type(cs, args.share_group_type)
@@ -4746,9 +4738,8 @@ def do_share_group_type_access_remove(cs, args):
help='Optional availability zone in which group should be created. '
'(Default=None)')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_create(cs, args):
"""Creates a new share group (Experimental)."""
"""Creates a new share group."""

share_types = []
if args.share_types:
@@ -4904,9 +4895,8 @@ def do_share_group_create(cs, args):
help='Filter results matching a share group description pattern. '
'Available only for microversion >= 2.36.')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_list(cs, args):
"""List share groups with filters (Experimental)."""
"""List share groups with filters."""
if args.columns is not None:
list_of_keys = _split_columns(columns=args.columns)
else:
@@ -4957,9 +4947,8 @@ def do_share_group_list(cs, args):
metavar='<share_group>',
help='Name or ID of the share group.')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_show(cs, args):
"""Show details about a share group (Experimental)."""
"""Show details about a share group."""
share_group = _find_share_group(cs, args.share_group)
_print_share_group(cs, share_group)

@@ -4979,9 +4968,8 @@ def do_share_group_show(cs, args):
help='Optional share group description. (Default=None)',
default=None)
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_update(cs, args):
"""Update a share group (Experimental)."""
"""Update a share group."""
kwargs = {}

if args.name is not None:
@@ -5009,9 +4997,8 @@ def do_share_group_update(cs, args):
help='Attempt to force delete the share group (Default=False)'
' (Admin only).')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_delete(cs, args):
"""Remove one or more share groups (Experimental)."""
"""Remove one or more share groups."""
failure_count = 0
kwargs = {}

@@ -5045,11 +5032,10 @@ def do_share_group_delete(cs, args):
'error_deleting. If no state is provided, '
'available will be used.'))
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_reset_state(cs, args):
"""Explicitly update the state of a share group

(Admin only, Experimental).
(Admin only).
"""
share_group = _find_share_group(cs, args.share_group)
cs.share_groups.reset_state(share_group, args.state)
@@ -5077,9 +5063,8 @@ def do_share_group_reset_state(cs, args):
help='Optional share group snapshot description. (Default=None)',
default=None)
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_create(cs, args):
"""Creates a new share group snapshot (Experimental)."""
"""Creates a new share group snapshot."""
kwargs = {'name': args.name, 'description': args.description}
share_group = _find_share_group(cs, args.share_group)
sg_snapshot = cs.share_group_snapshots.create(share_group.id, **kwargs)
@@ -5152,9 +5137,8 @@ def do_share_group_snapshot_create(cs, args):
help='Comma separated list of columns to be displayed '
'example --columns "id,name".')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_list(cs, args):
"""List share group snapshots with filters (Experimental)."""
"""List share group snapshots with filters."""
if args.columns is not None:
list_of_keys = _split_columns(columns=args.columns)
else:
@@ -5182,9 +5166,8 @@ def do_share_group_snapshot_list(cs, args):
metavar='<share_group_snapshot>',
help='Name or ID of the share group snapshot.')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_show(cs, args):
"""Show details about a share group snapshot (Experimental)."""
"""Show details about a share group snapshot."""
sg_snapshot = _find_share_group_snapshot(cs, args.share_group_snapshot)
_print_share_group_snapshot(cs, sg_snapshot)

@@ -5201,9 +5184,8 @@ def do_share_group_snapshot_show(cs, args):
help='Comma separated list of columns to be displayed '
'example --columns "id,name".')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_list_members(cs, args):
"""List members of a share group snapshot (Experimental)."""
"""List members of a share group snapshot."""
if args.columns is not None:
list_of_keys = _split_columns(columns=args.columns)
else:
@@ -5228,11 +5210,10 @@ def do_share_group_snapshot_list_members(cs, args):
metavar='<share_group_snapshot>',
help='Name or ID of the share group snapshot.')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_reset_state(cs, args):
"""Explicitly update the state of a share group snapshot

(Admin only, Experimental).
(Admin only).
"""
sg_snapshot = _find_share_group_snapshot(cs, args.share_group_snapshot)
cs.share_group_snapshots.reset_state(sg_snapshot, args.state)
@@ -5253,9 +5234,8 @@ def do_share_group_snapshot_reset_state(cs, args):
help='Optional share group snapshot description. (Default=None)',
default=None)
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_update(cs, args):
"""Update a share group snapshot (Experimental)."""
"""Update a share group snapshot."""
kwargs = {}

if args.name is not None:
@@ -5283,9 +5263,8 @@ def do_share_group_snapshot_update(cs, args):
help='Attempt to force delete the share group snapshot(s) (Default=False)'
' (Admin only).')
@cliutils.service_type('sharev2')
@api_versions.experimental_api
def do_share_group_snapshot_delete(cs, args):
"""Remove one or more share group snapshots (Experimental)."""
"""Remove one or more share group snapshots."""
failure_count = 0
kwargs = {}



+ 10
- 0
releasenotes/notes/remove-experimental-flag-from-share-groups-feature-dcf2b0b67fe4cac4.yaml View File

@@ -0,0 +1,10 @@
---
prelude: >
Since the share group APIs have graduated from their `experimental feature
state <https://docs.openstack.org/manila/latest/contributor/experimental_apis.html>`_
in API version ``2.55``, the client was updated to fit into those changes,
and the share group commands will no longer include the
`X-OpenStack-Manila-API-Experimental`` header in the request. Share group
types can be created to encompass one or more share types, share groups
can be created, updated, snapshotted and deleted, and shares can be created
within share groups.

Loading…
Cancel
Save