Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Commit

Permalink
Add list_network_attachments.
Browse files Browse the repository at this point in the history
Currently, the server side isn't accepting the GET arguments,
but this should pass them correctly.
  • Loading branch information
henn committed Aug 19, 2016
1 parent a13d140 commit 7d396a6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion haas/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,21 @@ def port_detach_nic(switch, port):
url = object_url('switch', switch, 'port', port, 'detach_nic')
do_post(url)

@cmd
def list_network_attachments(network, project):
"""List nodes connected to a network
<project> may be either "all" or a specific project name.
"""
url = object_url('network', network, 'attachments')

if project == "all":
do_get(url)
else:
do_get(url, data={'project':project})

@cmd
def list_nodes(is_free):
"""List all nodes or all free nodes
<is_free> may be either "all" or "free", and determines whether
to list all nodes or all free nodes.
"""
Expand Down

0 comments on commit 7d396a6

Please sign in to comment.