Revision 1598fc75 kamaki/cli/commands/pithos.py
b/kamaki/cli/commands/pithos.py | ||
---|---|---|
1546 | 1546 |
limit=IntArgument('set default container limit', '--limit'), |
1547 | 1547 |
meta=KeyValueArgument( |
1548 | 1548 |
'set container metadata (can be repeated)', '--meta'), |
1549 |
project=ValueArgument('assign the container to project', '--project'), |
|
1549 |
project_id=ValueArgument('assign the container to project', |
|
1550 |
'--project-id'), |
|
1550 | 1551 |
) |
1551 | 1552 |
|
1552 | 1553 |
@errors.generic.all |
... | ... | |
1558 | 1559 |
container=container, |
1559 | 1560 |
sizelimit=self['limit'], |
1560 | 1561 |
versioning=self['versioning'], |
1561 |
project=self['project'],
|
|
1562 |
project_id=self['project_id'],
|
|
1562 | 1563 |
metadata=self['meta'], |
1563 | 1564 |
success=(201, )) |
1564 | 1565 |
except ClientError as ce: |
... | ... | |
1628 | 1629 |
|
1629 | 1630 |
@command(container_cmds) |
1630 | 1631 |
class container_reassign(_pithos_account, _optional_output_cmd): |
1631 |
"""Assign a container to a different project |
|
1632 |
""" |
|
1632 |
"""Assign a container to a different project""" |
|
1633 |
|
|
1634 |
arguments = dict( |
|
1635 |
project_id=ValueArgument('The project to assign', '--project-id') |
|
1636 |
) |
|
1637 |
required = ('project_id', ) |
|
1633 | 1638 |
|
1634 | 1639 |
@errors.generic.all |
1635 | 1640 |
@errors.pithos.connection |
... | ... | |
1639 | 1644 |
self.client.container = self.container |
1640 | 1645 |
self._optional_output(self.client.reassign_container(project)) |
1641 | 1646 |
|
1642 |
def main(self, container, project):
|
|
1647 |
def main(self, container): |
|
1643 | 1648 |
super(self.__class__, self)._run() |
1644 | 1649 |
self.container = container |
1645 |
self._run(project) |
|
1650 |
self._run(project=self['project_id'])
|
|
1646 | 1651 |
|
1647 | 1652 |
|
1648 | 1653 |
@command(sharer_cmds) |
Also available in: Unified diff