summaryrefslogtreecommitdiffstats
path: root/gluster/swift/common/constraints.py
diff options
context:
space:
mode:
Diffstat (limited to 'gluster/swift/common/constraints.py')
-rw-r--r--gluster/swift/common/constraints.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gluster/swift/common/constraints.py b/gluster/swift/common/constraints.py
index 1ae8cbb..acdd3f5 100644
--- a/gluster/swift/common/constraints.py
+++ b/gluster/swift/common/constraints.py
@@ -23,6 +23,7 @@ from gluster.swift.common import Glusterfs, ring
MAX_OBJECT_NAME_COMPONENT_LENGTH = 255
+
def set_object_name_component_length(len=None):
global MAX_OBJECT_NAME_COMPONENT_LENGTH
@@ -31,13 +32,14 @@ def set_object_name_component_length(len=None):
elif hasattr(swift.common.constraints, 'constraints_conf_int'):
MAX_OBJECT_NAME_COMPONENT_LENGTH = \
swift.common.constraints.constraints_conf_int(
- 'max_object_name_component_length', 255)
+ 'max_object_name_component_length', 255)
else:
MAX_OBJECT_NAME_COMPONENT_LENGTH = 255
return
set_object_name_component_length()
+
def get_object_name_component_length():
return MAX_OBJECT_NAME_COMPONENT_LENGTH