summaryrefslogtreecommitdiff
path: root/openstackclient/api
Commit message (Collapse)AuthorAgeFilesLines
* Support --community in openstack image listNobuto Murata2018-07-241-6/+11
| | | | | | | | | "--community" was added to "image create" and "image set" previously, but was missed in "image list". Change-Id: I959fdd7f67ae62c8326659ce52389228152ec019 Story: 2001925 Task: 14453
* Re-implement novaclient bits removed in 10.0Dean Troyer2018-03-131-1/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a) /os-floating-ips was removed in Compute API 2.36 and from novaclient's Python API in 10.0 Add to api.computev2: floating_ip_add() floating_ip_remove() Convert add floating IP command to nova-net/neutron split: "server add floating ip" "server remove floating ip" b) /os-hosts was removed in Compute API 2.43 and from novaclient's Python API in 10.0. Add to api.computev2: host_list() host_set() host_show() Convert host commands to use intenal api: "host list" "host set" "host show" c) The introduction of the Network-style commands into the server group broke cliff's autoprogram directive as it executes the get_parser() methods without fully initializing the Command object. NOTE: This is really three reviews squashed to get through the gate in one pass. Depends-on: Id6de87211d6c4ea8fd14aa9203d8d5b17e9e2f04 Change-Id: I5116086f9a9e4b2b31a744bf8f4558c79f0bfe59
* Remove a bunch of things we promised to remove in 2H 2017Dean Troyer2017-11-301-28/+0
| | | | Change-Id: I060559fe13e354fe87551cd9dd82774bddb54640
* Allow objects to be streamed to stdoutHonza Pokorny2017-07-051-5/+10
| | | | Change-Id: Icd8de6b2122fe77926d93da9bda08f56c3672a7a
* Trivial fix typosVu Cong Tuan2017-05-301-1/+1
| | | | Change-Id: I72a1da209df38e226ec02d9dbd0142ed4020c0d2
* Fix Nova-net netowrk commandsDean Troyer2017-04-271-11/+12
| | | | | | | | | | | | In cleaning up functional tests for nova-net, I discovered some problems in network create: * --subnet option is required in network create command * Switch API to use /os-networks rather than /os-tenant-networks as this is what we were actually using via novaclient * Fix functional tests for nova-net * Normalize some private function names in network/v2/network.py Change-Id: I426b864406756d58d140575a3a45ee9aee67ce84
* Low-level Compute v2 API: floating ip poolDean Troyer2017-04-181-1/+18
| | | | | | | | | | | | | api.compute.APIv2 floating ip pool function. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Also includes a handful of cleanups that the previous security group and floating IP reviews missed. Change-Id: I20116ec4fc1113857d8d917bfb30fa3170d05b9f
* Low-level Compute v2 API: networkDean Troyer2017-04-171-0/+94
| | | | | | | | | | api.compute.APIv2 network functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: If230f128e91cda44461fe93c976cac2aecec2252
* Merge "Low-level Compute v2 API: floating ip"Jenkins2017-04-171-0/+82
|\
| * Low-level Compute v2 API: floating ipDean Troyer2017-04-111-0/+82
| | | | | | | | | | | | | | | | | | | | api.compute.APIv2 floating ip functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: Ic461b8d15e072e0534dcd73fff6857581d83c89b
* | Low-level Compute v2 API: security group rulesDean Troyer2017-04-111-0/+97
|/ | | | | | | | | | api.compute.APIv2 security group rule functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: Ieabd61113bc6d3562738686f52bb06aa84fca765
* Low-level Compute v2 API: security groupDean Troyer2017-04-111-0/+211
| | | | | | | | | | api.compute.APIv2 starts with security group functions. novaclient 8.0 is now released without support for the previously deprecated nova-net functions, so include a new low-level REST implementation of the removed APIs. Change-Id: Id007535f0598226a8202716232313e37fe6247f9
* Make 'object save' fast againJordan Pittier2017-01-091-1/+1
| | | | | | | | | | | | | 'openstack object save' is critically slow to download big objects. While we 'stream' (chunked download) the data, the default chunks_size is 1 byte [1], which is terribly inefficient. [1] : http://docs.python-requests.org/en/master/api/#requests.Response.iter_content Closes-Bug: 1654645 Change-Id: I2223e5897346acd2f2c1fae638d1193cff833c19
* Fixes image api URL endpoint for certain scenarioImtiaz Chowdhury2017-01-042-6/+6
| | | | | | | | | | | | | | | | | | | openstackclient fails to get image list when the image api endpoint has 'v2' substring in the URL. Instead of checking whether the api endpoint URL terminates with '/v2', the current logic is checking whether 'v2' appears anywhere in the endpoint string. This issue was discovered on a production setup where certain server names had 'v2' in their names. For example, when a hostname is gopher.dev20.com, the image list APIs fail. This commit updates the unit test to reflect this scenario. Without the change in openstackclient/api/image_v2.py, all the unit tests fail. Co-Authored-By: sergio.carvalho@workday.com Change-Id: I26b85afd646938272dbabe8e045b337b7df58c7d Closes-Bug: 1652827
* Add option "--name" to command "openstack object create"Rajasi Kulkarni2016-09-261-2/+9
| | | | | | | | | | | Option "--name" can be used to set as the object name of the file to be uploaded in the container. Similar to option "--object-name" in command "swift upload". Added unit test case to ensure an exception is raised when using option "--name" for uploading multiple objects. Change-Id: Ied7827841f6ca1cf9d4b48e304cbe5d62eda38ab Closes-Bug: #1607972
* Add importing file to import warningsDean Troyer2016-08-301-1/+4
| | | | | | | | Add the Python file doing the import to the warnings emitted by the modules moved to osc-lib. Users will at least have a hint as to which package is out-of-date. Change-Id: I633b440c30b2b15cfde7a9013e30dfa39ab200bc
* Standardize import formatshizhihui2016-07-221-2/+1
| | | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
* remove unused LOGji-xuepeng2016-07-091-4/+0
| | | | | | This is to remove unused LOG to keep code clean. Change-Id: Ic544157b19cefb4120381f3314334c60a9020baf
* osc-lib: api.authDean Troyer2016-06-301-222/+8
| | | | | | Move auth plugin checking to osc-lib. Change-Id: I673d9c2d6e8bbf724c3000459a729e831d747814
* Remove OSCGenericPassword pluginDean Troyer2016-06-222-46/+2
| | | | | | | The need for this has passed plus with 3.0 we can take the breakage hit, if any. Change-Id: Ic019842f00033d2cd67b75f036e7e817e4b7c075
* Fix token/endpoint auth pluginDean Troyer2016-06-211-25/+30
| | | | | | | | | | | [This is not quite reduced from the original proposed fix as some changes have merged that complicate the switch to OSC_Config and v2 auth broke anyway.] Fix the --os-token --os-url breakage in the switch to ksa. Closes-bug: 1593664 Change-Id: I3ac23234fbf647fb145c7bd151d53c5c105462bf
* Refactor setting defaults for some scope parametersAlvaro Lopez Garcia2016-06-212-2/+5
| | | | | | | | | | The code is setting defaults for some scope parameters, cheking if the name ends with some specific substring (namely ending in "password") causing failures in some plugins that end with the same string, but do not allow those parameters (like "user_domain_id" in "v3oidcpassword"). Closes-Bug: #1582774 Change-Id: Id7036db3b783b135353d035dc4c1df7c808d6474
* Refactor check_valid_auth_options functionAlvaro Lopez Garcia2016-06-211-22/+21
| | | | | | | | | | | | The functions check_valid_auth_options() function was relying on the name for checking the set of required options, but this could cause errors with external auth plugins. If somebody defines an auth plugin plugin named "footoken" the check function would check for a "token" option, even if the plugin has not defined that option. This change tries to improve this situation, cheking for some options only if they have been defined in the plugin. Change-Id: I4255f2e7d4d23449c95be957ea7b6b60983f2608
* Do not prompt for scope options with default scoped tokensDolph Mathews2016-06-171-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the scope validation to occur after a token has already been created. Previous flow: 1. Validate authentication options. 2. Validate authorization options if the command requires a scope. 3. Create a token (using authentication + authorization options) 4. Run command. This means that scope was being checked, even if a default scope was applied in step 3 by Keystone. New flow: 1. Validate authentication options. 2. Create token (using authentication + authorization options) 3 Validate authorization options if the command requires a scope and the token is not scoped. 4. Run command. Change-Id: Idae368a11249f425b14b891fc68b4176e2b3e981 Closes-Bug: 1592062
* Fix missing i18n supports in api/ and shell.pyHuanxuan Ao2016-06-143-18/+28
| | | | | Change-Id: I28d79d7f44b27d2b600dedad2a3601180650ad83 Partial-bug: #1574965
* osc-lib: utilsDean Troyer2016-06-132-2/+3
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* osc-lib: exceptionsDean Troyer2016-06-132-3/+2
| | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* Moving authentication from keystoneclient to keystoneauthNavid Pustchi2016-06-092-30/+18
| | | | | | | | | | | | | | | | | Currently OpenStackClient uses keystoneclient for authentication. This change will update OpenStackClient to use keystoneauth for authentication. All dependant test have been updated. Updating how auth_ref is set in the tests to use KSA fixtures had some racy side-effects. The user_role_list tests failed when they picked up an auth_ref that was a fixture. This exposed a weakness in ListUserRole that needed to be fixed at the same time re handling of unscoped tokens and options. Change-Id: I4ddb2dbbb3bf2ab37494468eaf65cef9213a6e00 Closes-Bug: 1533369
* Avoid TypeError on message object additionsMadhu Mohan Nelemane2016-05-191-16/+20
| | | | | Change-Id: I634c1e158e93eeb55ab17fef8a0715b6678dffec Closes-Bug: #1575787
* Fix typos in docstrings and commentsDao Cong Tien2016-04-062-2/+2
| | | | Change-Id: Ic2dc057dca87212f715970f8325956c42f62ea9f
* Merge "Clean up unnecessary import of urlparse module"Jenkins2016-03-011-6/+1
|\
| * Clean up unnecessary import of urlparse moduleYang Hongyang2016-03-011-6/+1
| | | | | | | | | | | | | | six.moves.urllib already covers the py2 and py3 compatibility issues of urlparse module, use six.moves.urllib.parse.urlparse is enough. Change-Id: I785f4f872850e5d770fdcf4c0d3392be3978cc4a
* | Trivial: Update image_list v2 docsYang Hongyang2016-03-011-4/+7
|/ | | | | | | This api doc is clearly copied from v1, we should update it to reflact v2 API. Added 'shared' param description. Change-Id: I73d36e3a2a0448c28edab788a9340fd46177f8ef
* Py3 replace dict.iteritems with six.iteritemsting.wang2016-02-241-1/+1
| | | | | | | | All dict.iteritems in osc are replaced with six.iteritems except this one. So fix it to add py3 compatibility. Change-Id: I1aa51399a36e650d262d839ce2b4ec04d3f91db2
* Use instanceof instead of typeBrandon Palm2016-02-222-4/+4
| | | | | | | | | Adjusted conditional statements to use instanceof when comparing variables. Instanceof supports inheritance type checking better than type. Change-Id: I4ee0004934dc2322d43ef07e797a6811e39a812c Closes-Bug: 1548530
* Clean redundant argument to dict.getting.wang2016-02-212-37/+32
| | | | | | | `dict.get()` returns `None` by default, if a key wasn't found. Removing `None` as second argument to avoid redundancy. Change-Id: Ia82f7469cd019509bbeccbfe54b15eeedc7bb6ea
* Merge "Support unscoped token request"Jenkins2016-02-211-3/+8
|\
| * Support unscoped token requestguang-yee2016-02-191-3/+8
| | | | | | | | | | | | | | | | Make scope check optional for the "token issue" command as unscoped token is a valid Keystone V2/V3 API. Change-Id: Ie1cded4dbfdafd3a78c0ebdf89e3f66762509930 Closes-Bug: #1543214
* | Replace string format arguments with function parametersting.wang2016-02-202-3/+3
|/ | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: I15b405bf4d4715263fe1e1262982467b3d4bc1f4 Closes-Bug: #1321274
* Fix a spell typosvenkatamahesh2016-02-031-2/+2
| | | | Change-Id: I422fc8086af83efa4c04fd1951b4738404c1a1b7
* when fetching object store properties use lower()Steve Martinelli2015-12-141-1/+1
| | | | | | | | | | | | sometimes properties within object store concepts are stored with mixed case depending on the client used to store said properties. when retrieving properties to 'show' the user, always call lower() on the property in question when comparing it to the reserved values of the swift API. Change-Id: I97ffc715788ca3cd021413124b6945a399465c99 Closes-Bug: 1525805
* Remove old code after sdk integrationTerry Howe2015-12-091-59/+0
| | | | | | We won't need this anymore. Change-Id: Ib10be1dedb8db81f0cba6e45b8a9b0aade2ab473
* Switch to ksa SessionDean Troyer2015-12-021-9/+10
| | | | | | | | * Change session imports to keystoneauth1 * Change keystoneclient.exception imports to keystoneauth1 * Change exceptions raised from internal API from keystoneclient to openstack.common Change-Id: I046d89f561d6fe04baae53726f9749d2e7fe2056
* validate non-ascii values for swift propertiesSteve Martinelli2015-11-121-0/+8
| | | | | | | | | skip properties that are non-ascii values, but proceed with properties that work. log these failed values back to the user. Change-Id: Iaca8909f4465a01c8aebfd290b1a322823702359 Closes-Bug: 1503898
* Fix up object-store show commandsSteve Martinelli2015-10-101-25/+41
| | | | | | | | | | | | | | | | 1) Change metadata to appear under a common 'properties' key, and use the utility to format them, this applied to object, account and container. 2) Clean up container and object output, which were setting the x-container-meta-owner property, but this is metadata only for the container, so it's pointless to have, removed it. 3) Container show was showing read/write ACLs and sync stuff, but these are not being returned by my swift by default, so I moved these to be checks, so we don't clutter the output. Change-Id: Ife7521fe9c2724035b06963c118bd6016ba2f5b5
* Fix non-ascii issue with object commandslin-hua-cheng2015-10-061-13/+22
| | | | | | | | Escape the container and object name whenever it is used as URL. Change-Id: I2343c1e67843ab53773b3fca6e258dc329cd9573 Closes-Bug: #1503508
* add set/unset support for objects in object storeSteve Martinelli2015-10-061-0/+40
| | | | | | | | | add docs and command support to set and unset metadata of objects that are stored in an object store (swift). Closes-Bug: #1501945 Change-Id: If838a4b3343b6ddb97cd4bd1cb63f0ba1c1a00a1
* add support for set/unset of container propertiesSteve Martinelli2015-10-061-16/+62
| | | | | | | | include docs and commands to set and unset container properties Partial-Bug: #1501945 Change-Id: I8d7e8cf356a2321a37ed940c4e10cae411b94dfd
* cleanup account ids from container commandsSteve Martinelli2015-10-021-6/+6
| | | | | | | use a common function to determine account ID instead of different ways - depending on the response and command Change-Id: I95adc5dc7d5a82a2cffc570d1ded24d1fc754a11
* Add support for showing account detailsSteve Martinelli2015-10-021-0/+21
| | | | | | | | | | add the command `openstack account show` that lists details about the object store account that the user authenticated against. Partial-Bug: #1501943 Change-Id: I1246dafee812b63a41d43be4e3598224364a2c11