Revision d97c83a5 kamaki/cli/commands/pithos.py
b/kamaki/cli/commands/pithos.py | ||
---|---|---|
1515 | 1515 |
'set container versioning (auto/none)', '--versioning'), |
1516 | 1516 |
limit=IntArgument('set default container limit', '--limit'), |
1517 | 1517 |
meta=KeyValueArgument( |
1518 |
'set container metadata (can be repeated)', '--meta') |
|
1518 |
'set container metadata (can be repeated)', '--meta'), |
|
1519 |
project=ValueArgument('assign the container to project', '--project'), |
|
1519 | 1520 |
) |
1520 | 1521 |
|
1521 | 1522 |
@errors.generic.all |
... | ... | |
1527 | 1528 |
container=container, |
1528 | 1529 |
sizelimit=self['limit'], |
1529 | 1530 |
versioning=self['versioning'], |
1531 |
project=self['project'], |
|
1530 | 1532 |
metadata=self['meta'], |
1531 | 1533 |
success=(201, )) |
1532 | 1534 |
except ClientError as ce: |
... | ... | |
1594 | 1596 |
self._run(container) |
1595 | 1597 |
|
1596 | 1598 |
|
1599 |
@command(container_cmds) |
|
1600 |
class container_reassign(_pithos_account, _optional_output_cmd): |
|
1601 |
"""Assign a container to a different project |
|
1602 |
""" |
|
1603 |
|
|
1604 |
@errors.generic.all |
|
1605 |
@errors.pithos.connection |
|
1606 |
@errors.pithos.container |
|
1607 |
def _run(self, project): |
|
1608 |
if self.container: |
|
1609 |
self.client.container = self.container |
|
1610 |
self._optional_output(self.client.reassign_container(project)) |
|
1611 |
|
|
1612 |
def main(self, container, project): |
|
1613 |
super(self.__class__, self)._run() |
|
1614 |
self.container = container |
|
1615 |
self._run(project) |
|
1616 |
|
|
1617 |
|
|
1597 | 1618 |
@command(sharer_cmds) |
1598 | 1619 |
class sharer_list(_pithos_account, _optional_json): |
1599 | 1620 |
"""List accounts who share file objects with current user""" |
Also available in: Unified diff