~smoser/euca2ools/describe-images-results

« back to all changes in this revision

Viewing changes to euca2ools/commands/euca/describegroups.py

  • Committer: Mitch Garnaat
  • Date: 2011-09-19 19:21:18 UTC
  • Revision ID: mitch.garnaat@eucalyptus.com-20110919192118-gq8zqspz54w3nmga
Clean up the error message you get when you specify in incorrect option.  Fixes LP 850196.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
class DescribeGroups(euca2ools.commands.eucacommand.EucaCommand):
38
38
 
39
 
    APIVersion = '2010-08-31'
 
39
    APIVersion = '2011-01-01'
40
40
    Description = 'Shows information about groups.'
41
41
    Args = [Param(name='group_name', ptype='string',
42
42
                  doc='group to describe',
69
69
    
70
70
    def display_groups(self, groups):
71
71
        for group in groups:
72
 
            group_string = '%s\t%s\t%s' % (group.owner_id, group.name,
73
 
                    group.description)
 
72
            if group.id:
 
73
                group_string = '%s\t%s\t%s\t%s' % (group.id, group.owner_id,
 
74
                                                   group.name, group.description)
 
75
            else:
 
76
                group_string = '%s\t%s\t%s' % (group.owner_id,
 
77
                                               group.name, group.description)
74
78
            print 'GROUP\t%s' % group_string
75
79
            for rule in group.rules:
76
80
                permission_string = '%s\t%s\tALLOWS\t%s\t%s\t%s' \