File tree Expand file tree Collapse file tree
openstackclient/object/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616"""Container v1 action implementations"""
1717
18+ import logging
19+
1820from osc_lib .cli import parseractions
1921from osc_lib .command import command
2022from osc_lib import utils
2123import six
2224
25+ from openstackclient .i18n import _
26+
27+
28+ LOG = logging .getLogger (__name__ )
29+
2330
2431class CreateContainer (command .Lister ):
2532 """Create new container"""
@@ -38,6 +45,10 @@ def take_action(self, parsed_args):
3845
3946 results = []
4047 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 ))
4152 data = self .app .client_manager .object_store .container_create (
4253 container = container ,
4354 )
Original file line number Diff line number Diff line change 1515
1616"""Object v1 action implementations"""
1717
18+ import logging
1819
1920from osc_lib .cli import parseractions
2021from osc_lib .command import command
2122from osc_lib import utils
2223import six
2324
25+ from openstackclient .i18n import _
26+
27+
28+ LOG = logging .getLogger (__name__ )
29+
2430
2531class CreateObject (command .Lister ):
2632 """Upload object to container"""
@@ -44,6 +50,10 @@ def take_action(self, parsed_args):
4450
4551 results = []
4652 for obj in parsed_args .objects :
53+ if len (obj ) > 1024 :
54+ LOG .warning (
55+ _ ('Object name is %s characters long, default limit'
56+ ' is 1024' ), len (obj ))
4757 data = self .app .client_manager .object_store .object_create (
4858 container = parsed_args .container ,
4959 object = obj ,
You can’t perform that action at this time.
0 commit comments