10 Commits

Author SHA1 Message Date
jiangfei
92dd20bdcb port-list support get-port-from-mac
cli command port-show use the restapi 'get /v1/port/detail?address
={macaddress}', it also lack restapi 'get /v1/port?address={mac}'

add port-list to get the port which has macaddress:
 ironic port-list --address {macaddress}
 ironic port-list --address {macaddress} --detail

Change-Id: I4d836940974812360066b7d977472991235cb5c9
Closes-Bug: #1416627
2015-02-05 06:10:05 -08:00
Lucas Alvares Gomes
14d264b171 List resources with detail
This commit adds support for getting a list of ports, chassis, ports
associated with a node and nodes associated with a chassis with all
attributes, to both the client and the shell CLI.

Closes-Bug: #1366866
Change-Id: If1941de66d70cdbcc3f31cefdbcd4f634e6ce24e
2014-09-09 15:10:44 +01:00
Dmitry Tantsur
b416865ba3 Add sort_key and sort_dir parameters to *-list
These arguments are using for sorting the result on the server.
Small refactoring was conducted to seperate processing of
common arguments for all lists into the utility function.

Change-Id: I33be1fcecc665c8f2207e53b24ff47954d80dc60
Closes-Bug: #1339731
2014-09-09 11:08:56 +02:00
Lucas Alvares Gomes
8e7d85430d Show port by MAC address
Expose a mean to search for a port by a given MAC address. e.g

$ ironic port-show --address aa:bb:cc:dd:ee:ff

Closes-Bug: #1355155
Change-Id: Ie069bdebfe5143fdcba62a6390729934a4b44f5a
2014-08-12 10:12:15 +01:00
Lucas Alvares Gomes
c3665d0916 Add pagination support to {node, port, chassis}-list
the presence of a 'next' field is the indicator to continue pagination
until there're no more values to be returned.

On the CLI two new options were added to commands used to list resources:

* --marker: Optional, the UUID of an item, eg the last item from a
  previous result set. Return the next result set.

* --limit: The maximum number of results to return per request, if:

  1) limit > 0, the maximum number of items to return.
  2) limit == 0, return the entire list of items.
  3) limit param is NOT specified (None), the number of items
  returned respect the maximum imposed by the Ironic API
  (see Ironic's api.max_limit option).

Closes-Bug: #1314992
Change-Id: I77cc7a7df65c3d2a84144b12a001487ff6832045
2014-07-15 11:04:02 +01:00
Martin Geisler
af741ec223 Add UTF-8 coding lines to all Python files
While not strictly necessary for files containing only ASCII
characters, adding a line with "coding: utf-8" can guard against
future SyntaxError's in case someone inserts a Unicode literal.

This commit adds such lines to all .py files. The syntax used by this
commit works with Python (of course). It also works with Emacs, which
will recognize the special "-*-" marker and use the "coding" variable
to correctly decode the file, even in an environment where UTF-8 is
not the default file encoding.

Existing coding lines were normalized to match the new lines added.

Partial-bug: #1325193
Change-Id: I58bf93fea711fd25890356a397e594bd820c99e3
2014-05-31 13:22:44 +02:00
Lucas Alvares Gomes
89513307de Replace node_id to node_uuid on Ports
The commit https://review.openstack.org/#/c/56682/ introduced node_uuid
for Ports in the Ironic API, this patch adjusts the client to reflect
that change.

Change-Id: Iae9ee8c5cadeae7803f74cca010bb6f8683667c0
2013-11-19 11:14:51 +00:00
Lucas Alvares Gomes
cc66495430 Implement *-update commands to resrouces
Added node-update, chassis-update and port-update commands for v1.

Change-Id: I051841fce2872f1e19f95117e8827d7a2b1b521c
2013-09-30 16:59:14 +01:00
Lucas Alvares Gomes
c6b9ccf5ac Add port-create and port-delete
Change-Id: I0c91b2142e5b73d0acf7c6741dfe10ba13919306
2013-09-25 19:16:15 -07:00
Lucas Alvares Gomes
92903077b2 Add port-show and port-list
Change-Id: I36fa0f5d4322603a90fd8ebe8ef833b60a6f73e5
2013-09-25 12:41:07 +01:00