Revision 43540670 kamaki/cli/commands/pithos.py
b/kamaki/cli/commands/pithos.py | ||
---|---|---|
1545 | 1545 |
'set container versioning (auto/none)', '--versioning'), |
1546 | 1546 |
limit=IntArgument('set default container limit', '--limit'), |
1547 | 1547 |
meta=KeyValueArgument( |
1548 |
'set container metadata (can be repeated)', '--meta') |
|
1548 |
'set container metadata (can be repeated)', '--meta'), |
|
1549 |
project=ValueArgument('assign the container to project', '--project'), |
|
1549 | 1550 |
) |
1550 | 1551 |
|
1551 | 1552 |
@errors.generic.all |
... | ... | |
1557 | 1558 |
container=container, |
1558 | 1559 |
sizelimit=self['limit'], |
1559 | 1560 |
versioning=self['versioning'], |
1561 |
project=self['project'], |
|
1560 | 1562 |
metadata=self['meta'], |
1561 | 1563 |
success=(201, )) |
1562 | 1564 |
except ClientError as ce: |
... | ... | |
1624 | 1626 |
self._run(container) |
1625 | 1627 |
|
1626 | 1628 |
|
1629 |
@command(container_cmds) |
|
1630 |
class container_reassign(_pithos_account, _optional_output_cmd): |
|
1631 |
"""Assign a container to a different project |
|
1632 |
""" |
|
1633 |
|
|
1634 |
@errors.generic.all |
|
1635 |
@errors.pithos.connection |
|
1636 |
@errors.pithos.container |
|
1637 |
def _run(self, project): |
|
1638 |
if self.container: |
|
1639 |
self.client.container = self.container |
|
1640 |
self._optional_output(self.client.reassign_container(project)) |
|
1641 |
|
|
1642 |
def main(self, container, project): |
|
1643 |
super(self.__class__, self)._run() |
|
1644 |
self.container = container |
|
1645 |
self._run(project) |
|
1646 |
|
|
1647 |
|
|
1627 | 1648 |
@command(sharer_cmds) |
1628 | 1649 |
class sharer_list(_pithos_account, _optional_json): |
1629 | 1650 |
"""List accounts who share file objects with current user""" |
Also available in: Unified diff