Revision 4a25486d kamaki/cli/commands/snf-astakos.py

b/kamaki/cli/commands/snf-astakos.py
43 43
    _command_init, errors, _optional_json, addLogSettings)
44 44
from kamaki.cli.command_tree import CommandTree
45 45
from kamaki.cli.utils import print_dict, format_size
46
from kamaki.cli.argument import FlagArgument, ValueArgument
46
from kamaki.cli.argument import FlagArgument, ValueArgument, IntArgument
47 47
from kamaki.cli.argument import CommaSeparatedListArgument
48 48
from kamaki.cli.logger import get_logger
49 49

  
......
655 655
    """List all applications (old and new)"""
656 656

  
657 657
    arguments = dict(
658
        project=ValueArgument('Filter by project id', '--with-project-id')
658
        project=IntArgument('Filter by project id', '--with-project-id')
659 659
    )
660 660

  
661 661
    @errors.generic.all
......
732 732
    """List all memberships"""
733 733

  
734 734
    arguments = dict(
735
        project=ValueArgument('Filter by project id', '--with-project-id')
735
        project=IntArgument('Filter by project id', '--with-project-id')
736 736
    )
737 737

  
738 738
    @errors.generic.all
739 739
    @astakoserror
740 740
    def _run(self):
741
        project = self['project']
742
        if project is not None:
743
            project = int(project)
744
        self._print(self.client.get_memberships(self.token, project))
741
        self._print(self.client.get_memberships(self.token, self['project']))
745 742

  
746 743
    def main(self):
747 744
        super(self.__class__, self)._run()

Also available in: Unified diff