[jira] [Commented] (LIBCLOUD-604) Add `ex_list_subnets` to OpenStack provider

2018-09-19 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/LIBCLOUD-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620271#comment-16620271
 ] 

ASF subversion and git services commented on LIBCLOUD-604:
--

Commit c7464b57dcc7e09fdfa01348de85f85046dac3a1 in libcloud's branch 
refs/heads/trunk from micafer
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=c7464b5 ]

Fix LIBCLOUD-997, implements LIBCLOUD-998 and LIBCLOUD-604


> Add `ex_list_subnets` to OpenStack provider
> ---
>
> Key: LIBCLOUD-604
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-604
> Project: Libcloud
>  Issue Type: New Feature
>  Components: Compute
>Affects Versions: 0.13.3
> Environment: Generic OpenStack
>Reporter: Tim Fall
>Priority: Minor
>
> Add equivalent function for returning listed subnets in OpenStack driver. 
> Similar to `ex_list_subnet` for EC2 endpoint providers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LIBCLOUD-998) Use "/v2.0/networks" path in case of the OpenStack_2_NodeDriver class

2018-09-19 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/LIBCLOUD-998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620270#comment-16620270
 ] 

ASF subversion and git services commented on LIBCLOUD-998:
--

Commit c7464b57dcc7e09fdfa01348de85f85046dac3a1 in libcloud's branch 
refs/heads/trunk from micafer
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=c7464b5 ]

Fix LIBCLOUD-997, implements LIBCLOUD-998 and LIBCLOUD-604


> Use "/v2.0/networks" path in case of the OpenStack_2_NodeDriver class
> -
>
> Key: LIBCLOUD-998
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-998
> Project: Libcloud
>  Issue Type: Improvement
>  Components: Compute
>Reporter: Miguel Caballer
>Priority: Major
>
> Currently OpenStack_2_NodeDriver class uses the deprecated path 
> "/os-networks" of the compute API instead of using the "/v2.0/networks" of 
> the neutron API that i the current one.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[15/18] libcloud git commit: merge upstream

2018-09-19 Thread vdloo
merge upstream


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5728c2be
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5728c2be
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5728c2be

Branch: refs/heads/trunk
Commit: 5728c2be2916c5c1d2bd6ccc1495e7fb26318cef
Parents: a5b8b97 7d5eb6f
Author: micafer 
Authored: Wed Sep 5 15:47:57 2018 +0200
Committer: micafer 
Committed: Wed Sep 5 15:47:57 2018 +0200

--
 .pylintrc   |1 +
 .travis.yml |   21 +-
 CHANGES.rst |   60 +-
 README.rst  |   13 +-
 contrib/scrap-ec2-sizes.py  |  281 ++
 .../images/misc/azure_blobs_account_kind.png|  Bin 0 -> 292732 bytes
 .../misc/azure_blobs_manage_access_keys_1.png   |  Bin 64259 -> 223140 bytes
 .../misc/azure_blobs_manage_access_keys_2.png   |  Bin 26247 -> 388303 bytes
 docs/_static/images/provider_logos/scaleway.png |  Bin 0 -> 11527 bytes
 docs/committer_guide.rst|   10 +-
 docs/compute/drivers/scaleway.rst   |   30 +
 docs/conf.py|4 +-
 docs/examples/compute/scaleway/create_node.py   |   16 +
 docs/examples/compute/scaleway/list_nodes.py|9 +
 docs/examples/compute/scaleway/list_volumes.py  |   12 +
 docs/other/changes_in_2_0.rst   |2 +-
 docs/storage/drivers/azure_blobs.rst|   12 +-
 libcloud/common/dimensiondata.py|2 +-
 libcloud/common/openstack.py|1 +
 libcloud/common/openstack_identity.py   |   14 +
 libcloud/compute/constants.py   | 4429 ++
 libcloud/compute/drivers/azure.py   |9 +-
 libcloud/compute/drivers/digitalocean.py|   16 +
 libcloud/compute/drivers/ec2.py | 2124 +
 libcloud/compute/drivers/gce.py |   15 +-
 libcloud/compute/drivers/openstack.py   |  239 +-
 libcloud/compute/drivers/scaleway.py|  663 +++
 libcloud/compute/providers.py   |2 +
 libcloud/compute/types.py   |1 +
 libcloud/storage/drivers/azure_blobs.py |   29 +-
 libcloud/storage/drivers/dummy.py   |2 -
 libcloud/test/__init__.py   |7 +-
 libcloud/test/common/test_openstack_identity.py |   11 +
 .../fixtures/digitalocean_v2/list_node.json |  112 +
 .../fixtures/openstack_v1.1/_port_v2.json   |   32 +
 .../fixtures/openstack_v1.1/_ports_v2.json  |  185 +
 .../compute/fixtures/scaleway/create_image.json |   21 +
 .../compute/fixtures/scaleway/create_node.json  |   40 +
 .../fixtures/scaleway/create_volume.json|   13 +
 .../scaleway/create_volume_snapshot.json|   15 +
 .../test/compute/fixtures/scaleway/error.json   |1 +
 .../fixtures/scaleway/error_invalid_image.json  |1 +
 .../compute/fixtures/scaleway/get_image.json|   21 +
 .../fixtures/scaleway/list_availability.json|   13 +
 .../compute/fixtures/scaleway/list_images.json  |   42 +
 .../compute/fixtures/scaleway/list_nodes.json   |   74 +
 .../fixtures/scaleway/list_nodes_empty.json |3 +
 .../compute/fixtures/scaleway/list_sizes.json   |   76 +
 .../scaleway/list_volume_snapshots.json |   30 +
 .../compute/fixtures/scaleway/list_volumes.json |   26 +
 .../fixtures/scaleway/list_volumes_empty.json   |3 +
 .../compute/fixtures/scaleway/reboot_node.json  |9 +
 .../compute/fixtures/scaleway/token_info.json   |   14 +
 .../compute/fixtures/scaleway/user_info.json|   15 +
 libcloud/test/compute/test_digitalocean_v2.py   |   12 +
 libcloud/test/compute/test_ec2.py   |   40 +-
 libcloud/test/compute/test_openstack.py |  129 +-
 libcloud/test/compute/test_scaleway.py  |  334 ++
 libcloud/test/secrets.py-dist   |5 +-
 libcloud/test/storage/test_azure_blobs.py   |4 +-
 libcloud/test/test_connection.py|   16 +
 libcloud/test/test_utils.py |8 +-
 libcloud/utils/files.py |4 +-
 setup.cfg   |4 +
 setup.py|8 +-
 tox.ini |   11 +-
 66 files changed, 7151 insertions(+), 2205 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5728c2be/libcloud/common/openstack.py
--

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5728c2be/libcloud/compute/drivers/openstack.py
--
diff 

[07/18] libcloud git commit: Imrpove test

2018-09-19 Thread vdloo
Imrpove test


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ca38440a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ca38440a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ca38440a

Branch: refs/heads/trunk
Commit: ca38440afb003c30b884cd6e1afb15cfb163d0d6
Parents: 15ae458
Author: micafer 
Authored: Tue Jan 30 12:46:23 2018 +0100
Committer: micafer 
Committed: Tue Jan 30 12:46:23 2018 +0100

--
 libcloud/test/common/test_openstack_identity.py | 40 
 1 file changed, 40 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ca38440a/libcloud/test/common/test_openstack_identity.py
--
diff --git a/libcloud/test/common/test_openstack_identity.py 
b/libcloud/test/common/test_openstack_identity.py
index bf0eb2b..79a129e 100644
--- a/libcloud/test/common/test_openstack_identity.py
+++ b/libcloud/test/common/test_openstack_identity.py
@@ -424,6 +424,30 @@ class 
OpenStackIdentity_3_0_ConnectionTests(unittest.TestCase):
 self.assertTrue(result)
 
 
+class 
OpenStackIdentity_3_0_Connection_OIDC_access_token_federation_projectsTests(
+unittest.TestCase):
+def setUp(self):
+mock_cls = OpenStackIdentity_3_0_federation_projects_MockHttp
+mock_cls.type = None
+OpenStackIdentity_3_0_Connection_OIDC_access_token.conn_class = 
mock_cls
+
+self.auth_instance = 
OpenStackIdentity_3_0_Connection_OIDC_access_token(auth_url='http://none',
+   
 user_id='idp',
+   
 key='token',
+   
 tenant_name='oidc',
+   
 domain_name='test_domain')
+self.auth_instance.auth_token = 'mock'
+
+def test_authenticate(self):
+auth = 
OpenStackIdentity_3_0_Connection_OIDC_access_token(auth_url='http://none',
+  
user_id='idp',
+  key='token',
+  
token_scope='project',
+  
tenant_name="oidc",
+  
domain_name='test_domain')
+auth.authenticate()
+
+
 class OpenStackIdentity_3_0_Connection_OIDC_access_tokenTests(
 unittest.TestCase):
 def setUp(self):
@@ -737,6 +761,22 @@ class OpenStackIdentity_3_0_MockHttp(MockHttp):
 raise NotImplementedError()
 
 
+class 
OpenStackIdentity_3_0_federation_projects_MockHttp(OpenStackIdentity_3_0_MockHttp):
+fixtures = ComputeFileFixtures('openstack_identity/v3')
+json_content_headers = {'content-type': 'application/json; charset=UTF-8'}
+
+def _v3_OS_FEDERATION_projects(self, method, url, body, headers):
+if method == 'GET':
+# get user projects
+body = json.dumps({"projects": [{"id": "project_id"}]})
+return (httplib.OK, body, self.json_content_headers, 
httplib.responses[httplib.OK])
+raise NotImplementedError()
+
+def _v3_auth_projects(self, method, url, body, headers):
+return (httplib.INTERNAL_SERVER_ERROR, body, self.json_content_headers,
+httplib.responses[httplib.INTERNAL_SERVER_ERROR])
+
+
 class OpenStackIdentity_2_0_Connection_VOMSMockHttp(MockHttp):
 fixtures = ComputeFileFixtures('openstack_identity/v2')
 json_content_headers = {'content-type': 'application/json; charset=UTF-8'}



[jira] [Commented] (LIBCLOUD-997) OpenStack_2_ImageConnection does not work if ex_force_base_url is used

2018-09-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/LIBCLOUD-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620272#comment-16620272
 ] 

ASF GitHub Bot commented on LIBCLOUD-997:
-

Github user asfgit closed the pull request at:

https://github.com/apache/libcloud/pull/1215


> OpenStack_2_ImageConnection does not work if ex_force_base_url is used
> --
>
> Key: LIBCLOUD-997
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-997
> Project: Libcloud
>  Issue Type: Bug
>  Components: Compute
>Reporter: Miguel Caballer
>Priority: Major
>
> The OpenStack_2_NodeDriver uses two connections
> the base class connection attribute and a new one: image_connection.
> In this case if the user has specified the ex_force_base_url one of them will 
> fail, as both uses the same base url, but there are different services with 
> different urls.  If the user set the compute base url (the standard case) the 
> image one will not work a viceversa
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[18/18] libcloud git commit: Add changes for #1215

2018-09-19 Thread vdloo
Add changes for #1215

Closes #1215


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/bad71c41
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/bad71c41
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/bad71c41

Branch: refs/heads/trunk
Commit: bad71c41ece620a1d7d957eb0fee66f2787e66fa
Parents: cdff950
Author: Rick van de Loo 
Authored: Wed Sep 19 10:07:11 2018 +0200
Committer: Rick van de Loo 
Committed: Wed Sep 19 10:07:11 2018 +0200

--
 CHANGES.rst | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/bad71c41/CHANGES.rst
--
diff --git a/CHANGES.rst b/CHANGES.rst
index 09921e1..a311c2e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -105,6 +105,15 @@ Compute
 - [OpenStack] Add get_user method (GITHUB-1216)
   [Ken Dreyer]
 
+- [OpenStack] Add ex_list_subnets to OpenStack_2_NodeDriver (GITHUB-1215, 
LIBCLOUD-604)
+  [Miguel Caballer]
+
+- [OpenStack] The OpenStack_2_NodeDriver uses two connections (GITHUB-1215, 
LIBCLOUD-997)
+  [Miguel Caballer]
+
+- [OpenStack] The OpenStack_2_NodeDriver /v2.0/networks instead of 
/os-networks (GITHUB-1215, LIBCLOUD-998)
+  [Miguel Caballer]
+
 - [Scaleway] New Scaleway driver (GITHUB-1121, GITHUB-1220)
   [Daniel Hunsaker, Nándor István Krácser, Rémy Léone]
 



[14/18] libcloud git commit: Fix lint

2018-09-19 Thread vdloo
Fix lint


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a5b8b975
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a5b8b975
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a5b8b975

Branch: refs/heads/trunk
Commit: a5b8b9753b86caf0d0e105a2da203a09ba53f177
Parents: b4e957f
Author: micafer 
Authored: Fri May 25 12:34:05 2018 +0200
Committer: micafer 
Committed: Fri May 25 12:34:05 2018 +0200

--
 libcloud/test/common/test_openstack_identity.py | 2 +-
 libcloud/test/compute/test_openstack.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a5b8b975/libcloud/test/common/test_openstack_identity.py
--
diff --git a/libcloud/test/common/test_openstack_identity.py 
b/libcloud/test/common/test_openstack_identity.py
index 1b6e144..c36f13a 100644
--- a/libcloud/test/common/test_openstack_identity.py
+++ b/libcloud/test/common/test_openstack_identity.py
@@ -591,7 +591,7 @@ class OpenStackServiceCatalogTestCase(unittest.TestCase):
 catalog = OpenStackServiceCatalog(service_catalog=service_catalog,
   auth_version='2.0')
 service_types = catalog.get_service_types()
-self.assertEqual(service_types, ['compute', 'image', 'network', 
+self.assertEqual(service_types, ['compute', 'image', 'network',
  'object-store', 'rax:object-cdn'])
 
 service_types = catalog.get_service_types(region='ORD')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/a5b8b975/libcloud/test/compute/test_openstack.py
--
diff --git a/libcloud/test/compute/test_openstack.py 
b/libcloud/test/compute/test_openstack.py
index 0a44460..d8ac0b0 100644
--- a/libcloud/test/compute/test_openstack.py
+++ b/libcloud/test/compute/test_openstack.py
@@ -1711,6 +1711,7 @@ class OpenStack_2_Tests(OpenStack_1_1_Tests):
 network = self.driver.ex_list_networks()[0]
 self.assertTrue(self.driver.ex_delete_network(network=network))
 
+
 class OpenStack_1_1_FactoryMethodTests(OpenStack_1_1_Tests):
 should_list_locations = False
 should_list_volumes = True
@@ -2182,6 +2183,7 @@ class OpenStack_2_0_MockHttp(OpenStack_1_1_MockHttp):
 setattr(self, new_name, method_type(method, self,
 OpenStack_2_0_MockHttp))
 
+
 class OpenStack_1_1_Auth_2_0_Tests(OpenStack_1_1_Tests):
 driver_args = OPENSTACK_PARAMS + ('1.1',)
 driver_kwargs = {'ex_force_auth_version': '2.0'}



[03/18] libcloud git commit: Improve error message

2018-09-19 Thread vdloo
Improve error message


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/00efcf2b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/00efcf2b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/00efcf2b

Branch: refs/heads/trunk
Commit: 00efcf2be242acfa8821dec7c2ec14537a5f9584
Parents: 7deee73
Author: micafer 
Authored: Wed Nov 29 13:51:18 2017 +0100
Committer: micafer 
Committed: Wed Nov 29 13:51:18 2017 +0100

--
 libcloud/common/openstack_identity.py | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/00efcf2b/libcloud/common/openstack_identity.py
--
diff --git a/libcloud/common/openstack_identity.py 
b/libcloud/common/openstack_identity.py
index 102e2e0..966c12b 100644
--- a/libcloud/common/openstack_identity.py
+++ b/libcloud/common/openstack_identity.py
@@ -1518,7 +1518,8 @@ class OpenStackIdentity_3_0_Connection_OIDC_access_token(
  driver=self.driver)
 else:
 raise MalformedResponseError('Malformed response',
- driver=self.driver)
+ driver=self.driver,
+ body=response.body)
 
 def _get_project_id(self, token):
 """
@@ -1542,7 +1543,8 @@ class OpenStackIdentity_3_0_Connection_OIDC_access_token(
 raise MalformedResponseError('Failed to parse JSON', e)
 else:
 raise MalformedResponseError('Malformed response',
- driver=self.driver)
+ driver=self.driver,
+ body=response.body)
 
 
 class OpenStackIdentity_2_0_Connection_VOMS(OpenStackIdentityConnection,
@@ -1622,7 +1624,8 @@ class 
OpenStackIdentity_2_0_Connection_VOMS(OpenStackIdentityConnection,
 raise MalformedResponseError('Failed to parse JSON', e)
 else:
 raise MalformedResponseError('Malformed response',
- driver=self.driver)
+ driver=self.driver,
+ body=response.body)
 
 def _get_tenant_name(self, token):
 """
@@ -1645,7 +1648,8 @@ class 
OpenStackIdentity_2_0_Connection_VOMS(OpenStackIdentityConnection,
 raise MalformedResponseError('Failed to parse JSON', e)
 else:
 raise MalformedResponseError('Malformed response',
- driver=self.driver)
+ driver=self.driver,
+ body=response.body)
 
 def _authenticate_2_0_with_body(self, reqbody):
 resp = self.request('/v2.0/tokens', data=reqbody,



[GitHub] libcloud pull request #1215: Fix LIBCLOUD-997, implements LIBCLOUD-998 and L...

2018-09-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/libcloud/pull/1215


---


[08/18] libcloud git commit: Merge pull request #1 from apache/trunk

2018-09-19 Thread vdloo
Merge pull request #1 from apache/trunk

Merge upstream

Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5deb1595
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5deb1595
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5deb1595

Branch: refs/heads/trunk
Commit: 5deb1595eb110e1ae92db01f2579f6c68e062fd0
Parents: ca38440 c58e892
Author: Miguel Caballer 
Authored: Fri May 11 13:42:22 2018 +0200
Committer: GitHub 
Committed: Fri May 11 13:42:22 2018 +0200

--
 .gitignore  |   1 +
 .travis.yml |   4 +-
 CHANGES.rst | 245 ++--
 README.rst  |  12 +-
 .../images/misc/gce/create_service_account.png  | Bin 0 -> 46211 bytes
 docs/_static/images/misc/gce/iam_and_roles.png  | Bin 0 -> 170197 bytes
 docs/_static/images/misc/gce/new_project.png| Bin 0 -> 17727 bytes
 .../images/misc/gce/project_dashboard.png   | Bin 0 -> 117485 bytes
 .../images/misc/gce/view_service_accounts.png   | Bin 0 -> 82062 bytes
 docs/compute/drivers/gce.rst|  49 +-
 docs/compute/drivers/openstack.rst  |  13 +-
 docs/dns/drivers/google.rst |  47 ++
 docs/examples/dns/godaddy/listing_records.py|   6 +-
 docs/examples/dns/godaddy/listing_zones.py  |   4 +-
 docs/examples/dns/godaddy/pricing_domain.py |   2 +-
 .../dns/google/dns_installed_application.py |   6 +
 docs/examples/dns/google/dns_internal_auth.py   |   6 +
 docs/examples/dns/google/dns_service_account.py |   6 +
 .../loadbalancer/softlayer/list_balancers.py|   2 +-
 docs/third_party_drivers.rst|  32 +-
 libcloud/__init__.py|   2 +-
 libcloud/common/aliyun.py   |   2 +-
 libcloud/common/base.py |   8 +-
 libcloud/common/brightbox.py|   7 +-
 libcloud/common/cloudstack.py   |   5 +-
 libcloud/common/openstack.py|   2 +-
 libcloud/common/ovh.py  |   5 +-
 libcloud/compute/base.py|  59 +-
 libcloud/compute/drivers/azure_arm.py   |   9 +
 libcloud/compute/drivers/cloudscale.py  |  32 +-
 libcloud/compute/drivers/cloudsigma.py  |   2 +-
 libcloud/compute/drivers/cloudstack.py  |  53 ++
 libcloud/compute/drivers/digitalocean.py| 182 +-
 libcloud/compute/drivers/dimensiondata.py   |  15 +-
 libcloud/compute/drivers/ec2.py | 123 
 libcloud/compute/drivers/ecs.py |  29 +
 libcloud/compute/drivers/elasticstack.py|   2 +-
 libcloud/compute/drivers/gce.py | 435 --
 libcloud/compute/drivers/hostvirtual.py |   2 +-
 libcloud/compute/drivers/ktucloud.py|   2 +-
 libcloud/compute/drivers/opennebula.py  |   2 +-
 libcloud/compute/drivers/openstack.py   | 249 +++-
 libcloud/compute/drivers/profitbricks.py|  11 +-
 libcloud/compute/drivers/vcloud.py  |   4 +-
 libcloud/compute/types.py   |  10 +-
 libcloud/dns/drivers/powerdns.py|   2 +-
 libcloud/http.py|   6 +
 libcloud/loadbalancer/drivers/ninefold.py   |   2 +-
 libcloud/storage/base.py|  13 +-
 libcloud/storage/drivers/azure_blobs.py |  21 +-
 libcloud/storage/drivers/cloudfiles.py  |   2 +-
 libcloud/storage/drivers/digitalocean_spaces.py |   3 +-
 libcloud/storage/drivers/oss.py |   2 +-
 libcloud/storage/drivers/s3.py  |   6 +-
 libcloud/storage/types.py   |  20 +-
 libcloud/test/common/test_openstack_identity.py |   5 +-
 libcloud/test/common/test_upcloud.py|   4 +-
 .../cloudstack/queryAsyncJobResult_88776.json   |   1 +
 .../cloudstack/queryAsyncJobResult_88777.json   |   1 +
 .../restoreVirtualMachine_default.json  |   1 +
 .../cloudstack/scaleVirtualMachine_default.json |   1 +
 .../digitalocean_v2/attach_floating_ip.json |   1 +
 .../digitalocean_v2/create_floating_ip.json |   1 +
 .../digitalocean_v2/detach_floating_ip.json |   1 +
 .../digitalocean_v2/ex_rebuild_node.json|  12 +
 .../digitalocean_v2/ex_resize_node.json |  12 +
 .../digitalocean_v2/list_floating_ips.json  |   2 +
 .../fixtures/digitalocean_v2/list_nodes.json|   6 +-
 .../digitalocean_v2/list_nodes_page_1.json  |   6 +-
 .../fixtures/ecs/create_security_group.xml  |   1 +
 .../ecs/delete_security_group_by_id.xml |   2 +-
 .../ecs/describe_security_group_attributes.xml  |  54 +-
 .../ecs/modify_security_group_by_id.xml |   4 +
 .../compute/fixtures/gce/aggregated_disks.json  |  11 

[01/18] libcloud git commit: Fix #LIBCLOUD-925

2018-09-19 Thread vdloo
Repository: libcloud
Updated Branches:
  refs/heads/trunk 20186b9e8 -> bad71c41e


Fix #LIBCLOUD-925


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/814bc3e3
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/814bc3e3
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/814bc3e3

Branch: refs/heads/trunk
Commit: 814bc3e366bdce7f2b935eeb3c7ed21d562cf3e8
Parents: 98c4fe0
Author: micafer 
Authored: Tue Jun 20 08:21:37 2017 +0200
Committer: micafer 
Committed: Tue Jun 20 08:21:37 2017 +0200

--
 libcloud/common/google.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/814bc3e3/libcloud/common/google.py
--
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 39d94e4..806e022 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -220,7 +220,9 @@ class GoogleResponse(JsonResponse):
 code = err.get('code')
 message = err.get('message')
 else:
-code = err.get('reason', None)
+code = None
+if 'reason' in err:
+code = err.get('reason')
 message = body.get('error_description', err)
 
 return (code, message)



[06/18] libcloud git commit: Merge remote-tracking branch 'upstream/trunk' into trunk

2018-09-19 Thread vdloo
Merge remote-tracking branch 'upstream/trunk' into trunk


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/15ae4580
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/15ae4580
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/15ae4580

Branch: refs/heads/trunk
Commit: 15ae45805dcef1d91498af33598ee5c2059c411a
Parents: 3dd6f4d 2f7637e
Author: micafer 
Authored: Mon Dec 18 10:21:24 2017 +0100
Committer: micafer 
Committed: Mon Dec 18 10:21:24 2017 +0100

--
 .travis.yml |  10 -
 CHANGES.rst |  13 +-
 contrib/Dockerfile  |  20 +-
 contrib/run_tests.sh|   2 +-
 docs/other/using-http-proxy.rst |   4 -
 docs/testing.rst|   7 +-
 libcloud/__init__.py|   4 +-
 libcloud/common/base.py |  11 +-
 libcloud/common/upcloud.py  |  36 +
 libcloud/compute/drivers/ec2.py |  78 +++
 libcloud/compute/drivers/upcloud.py |  24 +-
 libcloud/test/__init__.py   |   7 +-
 libcloud/test/common/test_openstack.py  |  11 +-
 libcloud/test/common/test_upcloud.py|  20 +
 .../compute/fixtures/upcloud/api_1_2_price.json | 683 +++
 libcloud/test/compute/test_ec2.py   |   6 +-
 libcloud/test/compute/test_upcloud.py   |  25 +-
 libcloud/test/test_init.py  |   2 +-
 libcloud/utils/py3.py   |  55 +-
 setup.py|  16 +-
 tox.ini |   7 +-
 21 files changed, 897 insertions(+), 144 deletions(-)
--




[11/18] libcloud git commit: Fix LIBCLOUD-997, implements LIBCLOUD-998 and LIBCLOUD-604

2018-09-19 Thread vdloo
Fix LIBCLOUD-997, implements LIBCLOUD-998 and LIBCLOUD-604


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/c7464b57
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c7464b57
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c7464b57

Branch: refs/heads/trunk
Commit: c7464b57dcc7e09fdfa01348de85f85046dac3a1
Parents: 271813f
Author: micafer 
Authored: Fri May 25 09:05:49 2018 +0200
Committer: micafer 
Committed: Fri May 25 09:05:49 2018 +0200

--
 docs/compute/drivers/openstack.rst  |  10 +-
 libcloud/common/openstack.py|   1 +
 libcloud/compute/drivers/openstack.py   | 110 ++-
 .../fixtures/openstack/_v2_0__networks.json |  33 ++
 .../fixtures/openstack/_v2_0__subnets.json  |  62 +++
 libcloud/test/compute/test_openstack.py |  26 -
 6 files changed, 239 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/c7464b57/docs/compute/drivers/openstack.rst
--
diff --git a/docs/compute/drivers/openstack.rst 
b/docs/compute/drivers/openstack.rst
index 199fa38..887057a 100644
--- a/docs/compute/drivers/openstack.rst
+++ b/docs/compute/drivers/openstack.rst
@@ -88,9 +88,17 @@ Available arguments:
 * ``ex_force_service_type``
 * ``ex_force_service_name``
 * ``ex_force_service_region``
-* ``ex_force_base_url`` - Base URL to the OpenStack API endpoint. By default,
+* ``ex_force_base_url`` - Base URL to the OpenStack nova API endpoint. By 
default,
   driver obtains API endpoint URL from the server catalog, but if this argument
   is provided, this step is skipped and the provided value is used directly.
+* ``ex_force_network_url`` - Base URL to the OpenStack neutron API endpoint. 
By default,
+  driver obtains API endpoint URL from the server catalog, but if this argument
+  is provided, this step is skipped and the provided value is used directly. 
Only valid 
+  in case of api_version >= 2.0.
+* ``ex_force_image_url`` - Base URL to the OpenStack glance API endpoint. By 
default,
+  driver obtains API endpoint URL from the server catalog, but if this argument
+  is provided, this step is skipped and the provided value is used directly. 
Only valid 
+  in case of api_version >= 2.0.
 
 Some examples which show how to use this arguments can be found in the section
 below.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/c7464b57/libcloud/common/openstack.py
--
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index 954a15d..6b7327a 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -156,6 +156,7 @@ class OpenStackBaseConnection(ConnectionUserAndKey):
 if ex_force_auth_version:
 self._auth_version = ex_force_auth_version
 
+self.base_url = ex_force_base_url
 self._ex_force_base_url = ex_force_base_url
 self._ex_force_auth_url = ex_force_auth_url
 self._ex_force_auth_token = ex_force_auth_token

http://git-wip-us.apache.org/repos/asf/libcloud/blob/c7464b57/libcloud/compute/drivers/openstack.py
--
diff --git a/libcloud/compute/drivers/openstack.py 
b/libcloud/compute/drivers/openstack.py
index 9bacad2..dc164fb 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -2479,6 +2479,13 @@ class OpenStack_2_Connection(OpenStackComputeConnection):
 accept_format = 'application/json'
 default_content_type = 'application/json; charset=UTF-8'
 
+def __init__(self, *args, **kwargs):
+if 'ex_force_image_url' in kwargs:
+del kwargs['ex_force_image_url']
+if 'ex_force_network_url' in kwargs:
+del kwargs['ex_force_network_url']
+super(OpenStack_2_Connection, self).__init__(*args, **kwargs)
+
 def encode_data(self, data):
 return json.dumps(data)
 
@@ -2492,6 +2499,18 @@ class 
OpenStack_2_ImageConnection(OpenStackImageConnection):
 return json.dumps(data)
 
 
+class OpenStack_2_NetworkConnection(OpenStackBaseConnection):
+service_type = 'network'
+service_name = 'neutron'
+service_region = 'RegionOne'
+responseCls = OpenStack_1_1_Response
+accept_format = 'application/json'
+default_content_type = 'application/json; charset=UTF-8'
+
+def encode_data(self, data):
+return json.dumps(data)
+
+
 class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 """
 OpenStack node driver.
@@ -2514,11 +2533,14 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 # See https://developer.openstack.org/api-ref/
 # 

[jira] [Commented] (LIBCLOUD-997) OpenStack_2_ImageConnection does not work if ex_force_base_url is used

2018-09-19 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/LIBCLOUD-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620269#comment-16620269
 ] 

ASF subversion and git services commented on LIBCLOUD-997:
--

Commit c7464b57dcc7e09fdfa01348de85f85046dac3a1 in libcloud's branch 
refs/heads/trunk from micafer
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=c7464b5 ]

Fix LIBCLOUD-997, implements LIBCLOUD-998 and LIBCLOUD-604


> OpenStack_2_ImageConnection does not work if ex_force_base_url is used
> --
>
> Key: LIBCLOUD-997
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-997
> Project: Libcloud
>  Issue Type: Bug
>  Components: Compute
>Reporter: Miguel Caballer
>Priority: Major
>
> The OpenStack_2_NodeDriver uses two connections
> the base class connection attribute and a new one: image_connection.
> In this case if the user has specified the ex_force_base_url one of them will 
> fail, as both uses the same base url, but there are different services with 
> different urls.  If the user set the compute base url (the standard case) the 
> image one will not work a viceversa
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[16/18] libcloud git commit: Fix lint issue

2018-09-19 Thread vdloo
Fix lint issue


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/45d33fda
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/45d33fda
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/45d33fda

Branch: refs/heads/trunk
Commit: 45d33fdacc79c182f8a17bd2f628e10c8ab184ec
Parents: 5728c2b
Author: micafer 
Authored: Wed Sep 5 16:18:43 2018 +0200
Committer: micafer 
Committed: Wed Sep 5 16:18:43 2018 +0200

--
 libcloud/compute/drivers/openstack.py | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/45d33fda/libcloud/compute/drivers/openstack.py
--
diff --git a/libcloud/compute/drivers/openstack.py 
b/libcloud/compute/drivers/openstack.py
index 024961d..211c651 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -2849,6 +2849,7 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 response = self.network_connection.request(
 self._subnets_url_prefix).object
 return self._to_subnets(response)
+
 def ex_list_ports(self):
 """
 List all OpenStack_2_PortInterfaces



[04/18] libcloud git commit: Fix LIBCLOUD-965

2018-09-19 Thread vdloo
Fix LIBCLOUD-965


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e23be018
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e23be018
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e23be018

Branch: refs/heads/trunk
Commit: e23be01804d4d435382fb2dc2b1bf68ad0f5e401
Parents: 00efcf2
Author: micafer 
Authored: Thu Nov 30 09:56:02 2017 +0100
Committer: micafer 
Committed: Thu Nov 30 09:56:02 2017 +0100

--
 libcloud/common/openstack_identity.py | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e23be018/libcloud/common/openstack_identity.py
--
diff --git a/libcloud/common/openstack_identity.py 
b/libcloud/common/openstack_identity.py
index 966c12b..4285933 100644
--- a/libcloud/common/openstack_identity.py
+++ b/libcloud/common/openstack_identity.py
@@ -1525,12 +1525,23 @@ class 
OpenStackIdentity_3_0_Connection_OIDC_access_token(
 """
 Get the first project ID accessible with the specified access token
 """
-path = '/v3/OS-FEDERATION/projects'
+# Try new path first (from ver 1.1)
+path = '/v3/auth/projects'
 response = self.request(path,
 headers={'Content-Type': 'application/json',
  'X-Auth-Token': token},
 method='GET')
 
+if response.status not in [httplib.UNAUTHORIZED, httplib.OK,
+   httplib.CREATED]:
+# In case of error try old one
+path = '/v3/OS-FEDERATION/projects'
+response = self.request(path,
+headers={'Content-Type':
+ 'application/json',
+ 'X-Auth-Token': token},
+method='GET')
+
 if response.status == httplib.UNAUTHORIZED:
 # Invalid credentials
 raise InvalidCredsError()



[17/18] libcloud git commit: Merge remote-tracking branch 'micafer/trunk' into trunk

2018-09-19 Thread vdloo
Merge remote-tracking branch 'micafer/trunk' into trunk


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/cdff9500
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/cdff9500
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/cdff9500

Branch: refs/heads/trunk
Commit: cdff9500b9217c1df896f2cfb99b43e2eb9b868f
Parents: 20186b9 45d33fd
Author: Rick van de Loo 
Authored: Wed Sep 19 10:01:11 2018 +0200
Committer: Rick van de Loo 
Committed: Wed Sep 19 10:01:11 2018 +0200

--
 docs/compute/drivers/openstack.rst  | 10 ++-
 libcloud/common/openstack.py|  1 +
 libcloud/compute/drivers/openstack.py   | 91 +++-
 .../openstack_v1.1/_v2_0__networks.json | 64 ++
 .../openstack_v1.1/_v2_0__networks_POST.json| 33 +++
 .../fixtures/openstack_v1.1/_v2_0__subnets.json | 62 +
 libcloud/test/compute/test_openstack.py | 70 +++
 7 files changed, 309 insertions(+), 22 deletions(-)
--




[12/18] libcloud git commit: Fix lint errors

2018-09-19 Thread vdloo
Fix lint errors


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/9980d03a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/9980d03a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/9980d03a

Branch: refs/heads/trunk
Commit: 9980d03a4edafd92606d0ec762ee786a8c7f590d
Parents: c7464b5
Author: micafer 
Authored: Fri May 25 09:23:21 2018 +0200
Committer: micafer 
Committed: Fri May 25 09:23:21 2018 +0200

--
 libcloud/compute/drivers/openstack.py | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9980d03a/libcloud/compute/drivers/openstack.py
--
diff --git a/libcloud/compute/drivers/openstack.py 
b/libcloud/compute/drivers/openstack.py
index dc164fb..a4300ae 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -2554,7 +2554,7 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 # We run the init once to get the Glance V2 API connection
 # and put that on the object under self.image_connection.
 self._ex_force_base_url = str(kwargs.pop('ex_force_image_url',
-None))
+ None))
 kwargs['ex_force_base_url'] = self._ex_force_base_url
 self.connectionCls = self.image_connectionCls
 super(OpenStack_2_NodeDriver, self).__init__(*args, **kwargs)
@@ -2563,7 +2563,7 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 # We run the init once to get the Neutron V2 API connection
 # and put that on the object under self.image_connection.
 self._ex_force_base_url = str(kwargs.pop('ex_force_network_url',
-None))
+ None))
 kwargs['ex_force_base_url'] = self._ex_force_base_url
 self.connectionCls = self.network_connectionCls
 super(OpenStack_2_NodeDriver, self).__init__(*args, **kwargs)
@@ -2736,7 +2736,6 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 )
 return self._to_image_member(response.object)
 
-
 def _to_networks(self, obj):
 networks = obj['networks']
 return [self._to_network(network) for network in networks]
@@ -2759,7 +2758,8 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 
 :rtype: ``list`` of :class:`OpenStackNetwork`
 """
-response = 
self.network_connection.request(self._networks_url_prefix).object
+response = self.network_connection.request(
+self._networks_url_prefix).object
 return self._to_networks(response)
 
 def _to_subnets(self, obj):
@@ -2784,7 +2784,8 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 
 :rtype: ``list`` of :class:`OpenStack_2_SubNet`
 """
-response = 
self.network_connection.request(self._subnets_url_prefix).object
+response = self.network_connection.request(
+self._subnets_url_prefix).object
 return self._to_subnets(response)
 
 
@@ -2908,4 +2909,4 @@ class OpenStack_2_SubNet(object):
 def __repr__(self):
 return '' % (self.id,
  self.name,
- self.cidr)
\ No newline at end of file
+ self.cidr)



[05/18] libcloud git commit: Fix test

2018-09-19 Thread vdloo
Fix test


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3dd6f4d5
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3dd6f4d5
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3dd6f4d5

Branch: refs/heads/trunk
Commit: 3dd6f4d5aec21f8d11e415fe4d95d2e316bb3dac
Parents: e23be01
Author: micafer 
Authored: Thu Nov 30 10:59:31 2017 +0100
Committer: micafer 
Committed: Thu Nov 30 10:59:31 2017 +0100

--
 libcloud/test/common/test_openstack_identity.py | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3dd6f4d5/libcloud/test/common/test_openstack_identity.py
--
diff --git a/libcloud/test/common/test_openstack_identity.py 
b/libcloud/test/common/test_openstack_identity.py
index 3812f12..bf0eb2b 100644
--- a/libcloud/test/common/test_openstack_identity.py
+++ b/libcloud/test/common/test_openstack_identity.py
@@ -729,6 +729,13 @@ class OpenStackIdentity_3_0_MockHttp(MockHttp):
 return (httplib.OK, body, self.json_content_headers, 
httplib.responses[httplib.OK])
 raise NotImplementedError()
 
+def _v3_auth_projects(self, method, url, body, headers):
+if method == 'GET':
+# get user projects
+body = json.dumps({"projects": [{"id": "project_id"}]})
+return (httplib.OK, body, self.json_content_headers, 
httplib.responses[httplib.OK])
+raise NotImplementedError()
+
 
 class OpenStackIdentity_2_0_Connection_VOMSMockHttp(MockHttp):
 fixtures = ComputeFileFixtures('openstack_identity/v2')



[13/18] libcloud git commit: Fix tests

2018-09-19 Thread vdloo
Fix tests


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b4e957f4
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b4e957f4
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b4e957f4

Branch: refs/heads/trunk
Commit: b4e957f43ab01c2d85571d8d91badf622a91bdea
Parents: 9980d03
Author: micafer 
Authored: Fri May 25 12:30:09 2018 +0200
Committer: micafer 
Committed: Fri May 25 12:30:09 2018 +0200

--
 libcloud/compute/drivers/openstack.py   | 36 +-
 libcloud/test/common/test_openstack_identity.py |  7 +-
 .../compute/fixtures/openstack/_v2_0__auth.json | 22 ++
 .../fixtures/openstack/_v2_0__networks.json | 33 -
 .../fixtures/openstack/_v2_0__subnets.json  | 62 
 .../openstack_v1.1/_v2_0__networks.json | 64 +
 .../openstack_v1.1/_v2_0__networks_POST.json| 33 +
 .../fixtures/openstack_v1.1/_v2_0__subnets.json | 62 
 libcloud/test/compute/test_openstack.py | 75 
 9 files changed, 246 insertions(+), 148 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b4e957f4/libcloud/compute/drivers/openstack.py
--
diff --git a/libcloud/compute/drivers/openstack.py 
b/libcloud/compute/drivers/openstack.py
index a4300ae..44342d5 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -80,6 +80,12 @@ class OpenStackImageConnection(OpenStackBaseConnection):
 service_region = 'RegionOne'
 
 
+class OpenStackNetworkConnection(OpenStackBaseConnection):
+service_type = 'network'
+service_name = 'neutron'
+service_region = 'RegionOne'
+
+
 class OpenStackNodeDriver(NodeDriver, OpenStackDriverMixin):
 """
 Base OpenStack node driver. Should not be used directly.
@@ -2479,13 +2485,6 @@ class OpenStack_2_Connection(OpenStackComputeConnection):
 accept_format = 'application/json'
 default_content_type = 'application/json; charset=UTF-8'
 
-def __init__(self, *args, **kwargs):
-if 'ex_force_image_url' in kwargs:
-del kwargs['ex_force_image_url']
-if 'ex_force_network_url' in kwargs:
-del kwargs['ex_force_network_url']
-super(OpenStack_2_Connection, self).__init__(*args, **kwargs)
-
 def encode_data(self, data):
 return json.dumps(data)
 
@@ -2499,10 +2498,7 @@ class 
OpenStack_2_ImageConnection(OpenStackImageConnection):
 return json.dumps(data)
 
 
-class OpenStack_2_NetworkConnection(OpenStackBaseConnection):
-service_type = 'network'
-service_name = 'neutron'
-service_region = 'RegionOne'
+class OpenStack_2_NetworkConnection(OpenStackNetworkConnection):
 responseCls = OpenStack_1_1_Response
 accept_format = 'application/json'
 default_content_type = 'application/json; charset=UTF-8'
@@ -2549,22 +2545,24 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver):
 if 'ex_force_auth_version' not in kwargs:
 kwargs['ex_force_auth_version'] = '3.x_password'
 
-original_ex_force_base_url = kwargs.get('ex_force_base_url', None)
+original_ex_force_base_url = kwargs.get('ex_force_base_url')
 
 # We run the init once to get the Glance V2 API connection
 # and put that on the object under self.image_connection.
-self._ex_force_base_url = str(kwargs.pop('ex_force_image_url',
- None))
-kwargs['ex_force_base_url'] = self._ex_force_base_url
+if original_ex_force_base_url or kwargs.get('ex_force_image_url'):
+kwargs['ex_force_base_url'] = \
+str(kwargs.pop('ex_force_image_url',
+   original_ex_force_base_url))
 self.connectionCls = self.image_connectionCls
 super(OpenStack_2_NodeDriver, self).__init__(*args, **kwargs)
 self.image_connection = self.connection
 
 # We run the init once to get the Neutron V2 API connection
 # and put that on the object under self.image_connection.
-self._ex_force_base_url = str(kwargs.pop('ex_force_network_url',
- None))
-kwargs['ex_force_base_url'] = self._ex_force_base_url
+if original_ex_force_base_url or kwargs.get('ex_force_network_url'):
+kwargs['ex_force_base_url'] = \
+str(kwargs.pop('ex_force_network_url',
+   original_ex_force_base_url))
 self.connectionCls = self.network_connectionCls
 super(OpenStack_2_NodeDriver, self).__init__(*args, **kwargs)
 self.network_connection = self.connection
@@ -2774,7 +2772,7 @@ class 

[10/18] libcloud git commit: return extra_specs in OpenStackNodeSize

2018-09-19 Thread vdloo
return extra_specs in OpenStackNodeSize


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/271813f5
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/271813f5
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/271813f5

Branch: refs/heads/trunk
Commit: 271813f59cd9f0b5b67f829b4d5427fe62a352b7
Parents: a6c19b6
Author: micafer 
Authored: Fri May 11 13:49:49 2018 +0200
Committer: micafer 
Committed: Fri May 11 13:49:49 2018 +0200

--
 libcloud/compute/drivers/openstack.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/271813f5/libcloud/compute/drivers/openstack.py
--
diff --git a/libcloud/compute/drivers/openstack.py 
b/libcloud/compute/drivers/openstack.py
index ea061a0..9bacad2 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -892,7 +892,7 @@ class OpenStack_1_0_NodeDriver(OpenStackNodeDriver):
  # XXX: needs hardcode
  vcpus=vcpus,
  bandwidth=None,
- extra=el.get('extra_specs')
+ extra=el.get('extra_specs'),
  # Hardcoded
  price=self._get_size_price(el.get('id')),
  driver=self.connection.driver)



[09/18] libcloud git commit: return extra_specs in OpenStackNodeSize

2018-09-19 Thread vdloo
return extra_specs in OpenStackNodeSize


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a6c19b6c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a6c19b6c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a6c19b6c

Branch: refs/heads/trunk
Commit: a6c19b6ce97a6c7d151ede99627bcdc8f6590f12
Parents: 5deb159
Author: micafer 
Authored: Fri May 11 13:47:20 2018 +0200
Committer: micafer 
Committed: Fri May 11 13:47:20 2018 +0200

--
 libcloud/compute/drivers/openstack.py | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/libcloud/blob/a6c19b6c/libcloud/compute/drivers/openstack.py
--
diff --git a/libcloud/compute/drivers/openstack.py 
b/libcloud/compute/drivers/openstack.py
index 7d824a4..ea061a0 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -892,6 +892,7 @@ class OpenStack_1_0_NodeDriver(OpenStackNodeDriver):
  # XXX: needs hardcode
  vcpus=vcpus,
  bandwidth=None,
+ extra=el.get('extra_specs')
  # Hardcoded
  price=self._get_size_price(el.get('id')),
  driver=self.connection.driver)



[02/18] libcloud git commit: Merge remote-tracking branch 'upstream/trunk' into trunk

2018-09-19 Thread vdloo
Merge remote-tracking branch 'upstream/trunk' into trunk


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/7deee735
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/7deee735
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/7deee735

Branch: refs/heads/trunk
Commit: 7deee735c43b38e021153579d41193b49cbba1dd
Parents: 814bc3e dcb0cef
Author: micafer 
Authored: Wed Nov 29 13:37:11 2017 +0100
Committer: micafer 
Committed: Wed Nov 29 13:37:11 2017 +0100

--
 .codecov.yml|23 +
 .coveralls.yml  | 2 -
 .gitignore  | 7 +
 .travis.yml |13 +-
 CHANGES.rst |   254 +-
 MANIFEST.in | 1 +
 README.rst  | 4 +-
 .../generate_provider_feature_matrix_table.py   |25 +-
 contrib/scrape-ec2-prices.py| 4 +-
 contrib/update_google_prices.py | 4 +-
 demos/example_openstack.py  |17 +
 doap_libcloud.rdf   |23 +-
 .../images/provider_logos/profitbricks.png  |   Bin 0 -> 3866 bytes
 docs/_static/images/provider_logos/upcloud.png  |   Bin 0 -> 20107 bytes
 docs/committer_guide.rst|26 +-
 .../_supported_methods_block_storage.rst| 4 +-
 .../_supported_methods_image_management.rst | 4 +-
 .../_supported_methods_key_pair_management.rst  | 2 -
 docs/compute/_supported_methods_main.rst| 2 -
 docs/compute/_supported_providers.rst   |   122 +-
 docs/compute/drivers/ec2.rst|13 +-
 docs/compute/drivers/openstack.rst  |30 +
 docs/compute/drivers/profitbricks.rst   |83 +
 docs/compute/drivers/upcloud.rst|45 +
 docs/compute/pricing.rst| 2 +-
 docs/conf.py|20 +-
 docs/container/_supported_methods.rst   | 2 +
 docs/container/_supported_providers.rst | 2 +
 docs/container/drivers/gke.rst  |28 +
 docs/copyright.rst  |10 +
 docs/dns/_supported_providers.rst   | 2 +-
 docs/dns/drivers/powerdns.rst   | 6 +-
 docs/examples/__init__.py   | 0
 docs/examples/backup/__init__.py| 0
 docs/examples/compute/__init__.py   | 0
 docs/examples/compute/auroracompute/__init__.py | 0
 .../auroracompute/instantiate_driver_region.py  | 4 +-
 docs/examples/compute/azure/__init__.py | 0
 docs/examples/compute/azure_arm/__init__.py | 0
 docs/examples/compute/bsnl/__init__.py  | 0
 docs/examples/compute/cloudframes/__init__.py   | 0
 docs/examples/compute/cloudscale/__init__.py| 0
 docs/examples/compute/cloudsigma/__init__.py| 0
 docs/examples/compute/cloudstack/__init__.py| 0
 .../start_interactive_shell_exoscale.py | 1 +
 .../start_interactive_shell_ikoula.py   | 1 +
 docs/examples/compute/cloudwatt/__init__.py | 0
 docs/examples/compute/digitalocean/__init__.py  | 0
 docs/examples/compute/dimensiondata/__init__.py | 0
 docs/examples/compute/ec2/__init__.py   | 0
 .../ec2/create_general_purpose_ssd_volume.py| 4 +-
 .../ec2/create_provisioned_iops_volume.py   | 4 +-
 docs/examples/compute/ecs/__init__.py   | 0
 docs/examples/compute/gandi/__init__.py | 0
 docs/examples/compute/gce/__init__.py   | 0
 docs/examples/compute/indosat/__init__.py   | 0
 .../compute/internetsolutions/__init__.py   | 0
 docs/examples/compute/libvirt/__init__.py   | 0
 docs/examples/compute/medone/__init__.py| 0
 docs/examples/compute/ntta/__init__.py  | 0
 docs/examples/compute/onapp/__init__.py | 0
 docs/examples/compute/oneandone/__init__.py | 0
 docs/examples/compute/openstack/__init__.py | 0
 docs/examples/compute/ovh/__init__.py   | 0
 docs/examples/compute/packet/__init__.py| 0
 docs/examples/compute/profitbricks/__init__.py  | 0
 .../compute/profitbricks/create_datacenter.py   |26 +
 .../examples/compute/profitbricks/create_lan.py |20 +
 .../compute/profitbricks/create_node.py |51 +
 .../compute/profitbricks/create_volume.py   |29 +
 .../compute/profitbricks/instantiate_driver.py  | 5 +
 docs/examples/compute/rackspace/__init__.py | 0
 docs/examples/compute/vsphere/__init__.py   | 0
 docs/examples/compute/vultr/__init__.py | 0