Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions src/azure/cli/commands/resourcegroup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .._util import TableOutput
from msrest import Serializer

from ..commands import command, description, option
from .._profile import Profile

Expand All @@ -19,14 +20,5 @@ def list_groups(args, unexpected):
#groups = rmc.resource_groups.list(filter=None, top=args.get('top'))
groups = rmc.resource_groups.list()

with TableOutput() as to:
for grp in groups:
assert isinstance(grp, ResourceGroup)
to.cell('Name', grp.name)
to.cell('Type', grp.properties)
to.cell('Location', grp.location)
to.cell('Tags', grp.tags)
to.end_row()
if not to.any_rows:
print('No resource groups defined')

serializable = Serializer().serialize_data(groups, "[ResourceGroup]")
return serializable