You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by AlexanderGrooff <gi...@git.apache.org> on 2018/07/06 09:07:02 UTC
[GitHub] libcloud pull request #1226: Add create and get_port to OpenStackv2 driver
GitHub user AlexanderGrooff opened a pull request:
https://github.com/apache/libcloud/pull/1226
Add create and get_port to OpenStackv2 driver
## Add methods for getting and creating ports on the OpenStackv2 driver
### Description
Adds the `ex_create_port` and `ex_get_port` methods for the OpenStackv2 driver. This complements the PR of @vdloo with these two extra methods.
The description of the Openstack API calls can be found here: https://developer.openstack.org/api-ref/compute/#port-interfaces-servers-os-interface
Output looks like the following:
```
In [8]: conn.ex_create_port(network, description='Creating a new port', name='New port', admin_state_up=True)
Out[8]: <PortInterface: id=72d2c353-343a-458e-9fbe-edadf04d4e26, state=DOWN, driver=OpenStack ...>
In [9]: conn.ex_get_port('72d2c353-343a-458e-9fbe-edadf04d4e26')
Out[9]: <PortInterface: id=72d2c353-343a-458e-9fbe-edadf04d4e26, state=DOWN, driver=OpenStack ...>
```
### Status
- done, ready for review
### Checklist (tick everything that applies)
- [X] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks)
- [ ] Documentation
- [X] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes)
cc @vdloo
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/AlexanderGrooff/libcloud add-openstack-create-and-get-port
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/1226.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1226
----
commit 7b674fd3cf7d8020f163a28752375c765e3893c5
Author: Alexander Grooff <al...@...>
Date: 2018-07-06T08:53:13Z
Add ex_create_port and ex_get_port to Openstackv2 driver
----
---
[GitHub] libcloud pull request #1226: Add create and get_port to OpenStackv2 driver
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/libcloud/pull/1226
---