Revision 0ea1dcc4 tools/store
b/tools/store | ||
---|---|---|
119 | 119 |
class Meta(Command): |
120 | 120 |
syntax = '[<container>[/<object>]]' |
121 | 121 |
description = 'get the metadata of an account, a container or an object' |
122 |
|
|
123 |
def add_options(self, parser): |
|
124 |
parser.add_option('-r', action='store_true', dest='restricted', |
|
125 |
default=False, help='show only user defined metadata') |
|
122 | 126 |
|
123 | 127 |
def execute(self, path=''): |
124 | 128 |
container, sep, object = path.partition('/') |
125 | 129 |
if object: |
126 |
meta = self.client.retrieve_object_metadata(container, object) |
|
130 |
meta = self.client.retrieve_object_metadata(container, object, |
|
131 |
self.restricted) |
|
127 | 132 |
elif container: |
128 |
meta = self.client.retrieve_container_metadata(container) |
|
133 |
meta = self.client.retrieve_container_metadata(container, |
|
134 |
self.restricted) |
|
129 | 135 |
else: |
130 |
meta = self.client.account_metadata() |
|
136 |
meta = self.client.account_metadata(self.restricted)
|
|
131 | 137 |
if meta == None: |
132 | 138 |
print 'Entity does not exist' |
133 | 139 |
else: |
Also available in: Unified diff