summaryrefslogtreecommitdiff
path: root/openstackclient/volume
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/volume')
-rw-r--r--openstackclient/volume/v1/snapshot.py13
-rw-r--r--openstackclient/volume/v2/snapshot.py13
-rw-r--r--openstackclient/volume/v2/volume_type.py4
3 files changed, 26 insertions, 4 deletions
diff --git a/openstackclient/volume/v1/snapshot.py b/openstackclient/volume/v1/snapshot.py
index de7bb5b9..93e17eb8 100644
--- a/openstackclient/volume/v1/snapshot.py
+++ b/openstackclient/volume/v1/snapshot.py
@@ -111,6 +111,12 @@ class ListSnapshot(lister.Lister):
def get_parser(self, prog_name):
parser = super(ListSnapshot, self).get_parser(prog_name)
parser.add_argument(
+ '--all-projects',
+ action='store_true',
+ default=False,
+ help='Include all projects (admin only)',
+ )
+ parser.add_argument(
'--long',
action='store_true',
default=False,
@@ -157,7 +163,12 @@ class ListSnapshot(lister.Lister):
# Just forget it if there's any trouble
pass
- data = self.app.client_manager.volume.volume_snapshots.list()
+ search_opts = {
+ 'all_tenants': parsed_args.all_projects,
+ }
+
+ data = self.app.client_manager.volume.volume_snapshots.list(
+ search_opts=search_opts)
return (column_headers,
(utils.get_item_properties(
s, columns,
diff --git a/openstackclient/volume/v2/snapshot.py b/openstackclient/volume/v2/snapshot.py
index bbc92c48..aa7630ae 100644
--- a/openstackclient/volume/v2/snapshot.py
+++ b/openstackclient/volume/v2/snapshot.py
@@ -108,6 +108,12 @@ class ListSnapshot(lister.Lister):
def get_parser(self, prog_name):
parser = super(ListSnapshot, self).get_parser(prog_name)
parser.add_argument(
+ '--all-projects',
+ action='store_true',
+ default=False,
+ help='Include all projects (admin only)',
+ )
+ parser.add_argument(
'--long',
action='store_true',
default=False,
@@ -149,7 +155,12 @@ class ListSnapshot(lister.Lister):
# Just forget it if there's any trouble
pass
- data = self.app.client_manager.volume.volume_snapshots.list()
+ search_opts = {
+ 'all_tenants': parsed_args.all_projects,
+ }
+
+ data = self.app.client_manager.volume.volume_snapshots.list(
+ search_opts=search_opts)
return (column_headers,
(utils.get_item_properties(
s, columns,
diff --git a/openstackclient/volume/v2/volume_type.py b/openstackclient/volume/v2/volume_type.py
index 8cca86f9..583e6ed9 100644
--- a/openstackclient/volume/v2/volume_type.py
+++ b/openstackclient/volume/v2/volume_type.py
@@ -73,9 +73,9 @@ class CreateVolumeType(show.ShowOne):
kwargs = {}
if parsed_args.public:
- kwargs['public'] = True
+ kwargs['is_public'] = True
if parsed_args.private:
- kwargs['private'] = True
+ kwargs['is_public'] = False
volume_type = volume_client.volume_types.create(
parsed_args.name,