We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 10d1c2f + 9912fdd commit f19240fCopy full SHA for f19240f
2 files changed
openstackclient/object/v1/container.py
@@ -15,11 +15,18 @@
15
16
"""Container v1 action implementations"""
17
18
+import logging
19
+
20
from osc_lib.cli import parseractions
21
from osc_lib.command import command
22
from osc_lib import utils
23
import six
24
25
+from openstackclient.i18n import _
26
27
28
+LOG = logging.getLogger(__name__)
29
30
31
class CreateContainer(command.Lister):
32
"""Create new container"""
@@ -38,6 +45,10 @@ def take_action(self, parsed_args):
38
45
39
46
results = []
40
47
for container in parsed_args.containers:
48
+ if len(container) > 256:
49
+ LOG.warning(
50
+ _('Container name is %s characters long, the default limit'
51
+ ' is 256'), len(container))
41
52
data = self.app.client_manager.object_store.container_create(
42
53
container=container,
43
54
)
openstackclient/object/v1/object.py
@@ -15,12 +15,18 @@
"""Object v1 action implementations"""
class CreateObject(command.Lister):
"""Upload object to container"""
@@ -44,6 +50,10 @@ def take_action(self, parsed_args):
44
for obj in parsed_args.objects:
+ if len(obj) > 1024:
55
+ _('Object name is %s characters long, default limit'
56
+ ' is 1024'), len(obj))
57
data = self.app.client_manager.object_store.object_create(
58
container=parsed_args.container,
59
object=obj,
0 commit comments