summaryrefslogtreecommitdiff
path: root/openstackclient/object
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/object')
-rw-r--r--openstackclient/object/v1/account.py8
-rw-r--r--openstackclient/object/v1/container.py18
-rw-r--r--openstackclient/object/v1/object.py6
3 files changed, 22 insertions, 10 deletions
diff --git a/openstackclient/object/v1/account.py b/openstackclient/object/v1/account.py
index 4847f8bb..d6bc9fd7 100644
--- a/openstackclient/object/v1/account.py
+++ b/openstackclient/object/v1/account.py
@@ -13,10 +13,9 @@
"""Account v1 action implementations"""
+from osc_lib.cli import format_columns
from osc_lib.cli import parseractions
from osc_lib.command import command
-from osc_lib import utils
-import six
from openstackclient.i18n import _
@@ -48,8 +47,9 @@ class ShowAccount(command.ShowOne):
def take_action(self, parsed_args):
data = self.app.client_manager.object_store.account_show()
if 'properties' in data:
- data['properties'] = utils.format_dict(data.pop('properties'))
- return zip(*sorted(six.iteritems(data)))
+ data['properties'] = format_columns.DictColumn(
+ data.pop('properties'))
+ return zip(*sorted(data.items()))
class UnsetAccount(command.Command):
diff --git a/openstackclient/object/v1/container.py b/openstackclient/object/v1/container.py
index 9f689ab6..917e41c0 100644
--- a/openstackclient/object/v1/container.py
+++ b/openstackclient/object/v1/container.py
@@ -17,10 +17,10 @@
import logging
+from osc_lib.cli import format_columns
from osc_lib.cli import parseractions
from osc_lib.command import command
from osc_lib import utils
-import six
from openstackclient.i18n import _
@@ -34,6 +34,16 @@ class CreateContainer(command.Lister):
def get_parser(self, prog_name):
parser = super(CreateContainer, self).get_parser(prog_name)
parser.add_argument(
+ '--public',
+ action='store_true',
+ default=False,
+ help="Make the container publicly accessible"
+ )
+ parser.add_argument(
+ '--storage-policy',
+ help="Specify a particular storage policy to use."
+ )
+ parser.add_argument(
'containers',
metavar='<container-name>',
nargs="+",
@@ -51,6 +61,8 @@ class CreateContainer(command.Lister):
' is 256'), len(container))
data = self.app.client_manager.object_store.container_create(
container=container,
+ public=parsed_args.public,
+ storage_policy=parsed_args.storage_policy
)
results.append(data)
@@ -230,9 +242,9 @@ class ShowContainer(command.ShowOne):
container=parsed_args.container,
)
if 'properties' in data:
- data['properties'] = utils.format_dict(data.pop('properties'))
+ data['properties'] = format_columns.DictColumn(data['properties'])
- return zip(*sorted(six.iteritems(data)))
+ return zip(*sorted(data.items()))
class UnsetContainer(command.Command):
diff --git a/openstackclient/object/v1/object.py b/openstackclient/object/v1/object.py
index aeb02536..01e537ee 100644
--- a/openstackclient/object/v1/object.py
+++ b/openstackclient/object/v1/object.py
@@ -17,11 +17,11 @@
import logging
+from osc_lib.cli import format_columns
from osc_lib.cli import parseractions
from osc_lib.command import command
from osc_lib import exceptions
from osc_lib import utils
-import six
from openstackclient.i18n import _
@@ -284,9 +284,9 @@ class ShowObject(command.ShowOne):
object=parsed_args.object,
)
if 'properties' in data:
- data['properties'] = utils.format_dict(data.pop('properties'))
+ data['properties'] = format_columns.DictColumn(data['properties'])
- return zip(*sorted(six.iteritems(data)))
+ return zip(*sorted(data.items()))
class UnsetObject(command.Command):