Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Libcloud-589] ProfitBricks Compute Driver Support #352

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9543c95
Pushing the PB compute driver into branch for PR to the Apache Libclo…
baldwinSPC Aug 26, 2014
1aa90ad
[Libcloud-589] ProfitBricks Compute Driver Support
baldwinSPC Aug 26, 2014
69af4ed
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 26, 2014
c54b183
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 26, 2014
ec2f055
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
0deda2c
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
bc60f47
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
337b977
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
fab2a8a
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
6619b90
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
4a9b3c3
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
17d7cd6
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
db71d89
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
fd4ed06
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
30e1074
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
4cb15b0
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
ea48d15
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
a07b405
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
93d7cca
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 27, 2014
6b5b143
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 28, 2014
878dea9
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 28, 2014
ba0ad33
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 29, 2014
a900d5e
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 29, 2014
08b628a
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 29, 2014
76d7863
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 29, 2014
aa36ab0
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 29, 2014
359fbb9
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 29, 2014
b043e4a
[Libcloud-589] Correcting issues raised in Travis CI.
baldwinSPC Aug 30, 2014
7d437c8
squashing all feedback items.
baldwinSPC Sep 2, 2014
3982616
[Libcloud-589] correcting linting and py3 issue.
baldwinSPC Sep 2, 2014
23f2f1f
[Libcloud-589] correcting linting and py3 issue.
baldwinSPC Sep 2, 2014
77c89ca
corrects most of the feedback, but not quite all.
baldwinSPC Sep 7, 2014
24ff08c
changed ex_describe_volume to take volume_id versus a volume.
baldwinSPC Sep 7, 2014
bf9ab46
correcting lint issue.
baldwinSPC Sep 7, 2014
0904cb7
Removed 'node' from the param list of detach_volume.
baldwinSPC Sep 7, 2014
28e9774
Various fixes in the Profitbricks driver:
Kami Sep 7, 2014
560cd31
Merge pull request #1 from Kami/LIBCLOUD-589_profitbricks_compute_driver
Sep 9, 2014
01beb7e
fixed two minor issues when the pb api returns no data.
baldwinSPC Sep 9, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,531 changes: 1,531 additions & 0 deletions libcloud/compute/drivers/profitbricks.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions libcloud/compute/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
('libcloud.compute.drivers.ec2', 'OutscaleINCNodeDriver'),
Provider.VSPHERE:
('libcloud.compute.drivers.vsphere', 'VSphereNodeDriver'),
Provider.PROFIT_BRICKS:
('libcloud.compute.drivers.profitbricks', 'ProfitBricksNodeDriver'),

# Deprecated
Provider.CLOUDSIGMA_US:
Expand Down
2 changes: 2 additions & 0 deletions libcloud/compute/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Provider(object):
:cvar IKOULA: Ikoula driver.
:cvar OUTSCALE_SAS: Outscale SAS driver.
:cvar OUTSCALE_INC: Outscale INC driver.
:cvar PROFIT_BRICKS: ProfitBricks driver.
"""
DUMMY = 'dummy'
EC2 = 'ec2_us_east'
Expand Down Expand Up @@ -122,6 +123,7 @@ class Provider(object):
OUTSCALE_SAS = 'outscale_sas'
OUTSCALE_INC = 'outscale_inc'
VSPHERE = 'vsphere'
PROFIT_BRICKS = 'profitbricks'

# OpenStack based providers
HPCLOUD = 'hpcloud'
Expand Down
12 changes: 12 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/attach_volume.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:connectStorageToServerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3613039</requestId>
<dataCenterId>c2df1871-6aac-458e-ad1a-ef3f530cb7aa</dataCenterId>
<dataCenterVersion>4</dataCenterVersion>
</return>
</ns2:connectStorageToServerResponse>
</S:Body>
</S:Envelope>
13 changes: 13 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/create_node.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:createServerReturn xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3768523</requestId>
<dataCenterId>3aefc31b-57e9-4af6-8348-af961ac00f74</dataCenterId>
<dataCenterVersion>3</dataCenterVersion>
<serverId>7b18b85f-cc93-4c2d-abcc-5ce732d35750</serverId>
</return>
</ns2:createServerReturn>
</S:Body>
</S:Envelope>
13 changes: 13 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/create_volume.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:createStorageReturn xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3532463</requestId>
<dataCenterId>06eac419-c2b3-4761-aeb9-10efdd2cf292</dataCenterId>
<dataCenterVersion>3</dataCenterVersion>
<storageId>f54aeea3-667a-4460-8cf0-80909509df0c</storageId>
</return>
</ns2:createStorageReturn>
</S:Body>
</S:Envelope>
12 changes: 12 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/destroy_node.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:deleteServerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3498434</requestId>
<dataCenterId>782247bf-f12d-4f08-8050-302c02c4b2e0</dataCenterId>
<dataCenterVersion>2</dataCenterVersion>
</return>
</ns2:deleteServerResponse>
</S:Body>
</S:Envelope>
12 changes: 12 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/destroy_volume.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:deleteStorageResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3616447</requestId>
<dataCenterId>c2df1871-6aac-458e-ad1a-ef3f530cb7aa</dataCenterId>
<dataCenterVersion>13</dataCenterVersion>
</return>
</ns2:deleteStorageResponse>
</S:Body>
</S:Envelope>
12 changes: 12 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/detach_volume.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:disconnectStorageFromServerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3614242</requestId>
<dataCenterId>c2df1871-6aac-458e-ad1a-ef3f530cb7aa</dataCenterId>
<dataCenterVersion>6</dataCenterVersion>
</return>
</ns2:disconnectStorageFromServerResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:clearDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3339052</requestId>
<dataCenterId>8669a69f-2274-4520-b51e-dbdf3986a476</dataCenterId>
<dataCenterVersion>2</dataCenterVersion>
</return>
</ns2:clearDataCenterResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:createDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3711001</requestId>
<dataCenterId>0c793dd1-d4cd-4141-86f3-8b1a24b2d604</dataCenterId>
<dataCenterVersion>1</dataCenterVersion>
<location>us/las</location>
</return>
</ns2:createDataCenterResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:createNicReturn xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3633314</requestId>
<dataCenterId>c2df1871-6aac-458e-ad1a-ef3f530cb7aa</dataCenterId>
<dataCenterVersion>27</dataCenterVersion>
<nicId>951e1b49-5f1b-4b2b-b7d9-263dba6e2ddd</nicId>
</return>
</ns2:createNicReturn>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3719240</requestId>
<dataCenterId>a3e6f83a-8982-4d6a-aebc-60baf5755ede</dataCenterId>
<dataCenterVersion>1</dataCenterVersion>
<dataCenterName>StackPointCloud</dataCenterName>
<provisioningState>AVAILABLE</provisioningState>
<location>us/las</location>
</return>
</ns2:getDataCenterResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getNicResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3707226</requestId>
<dataCenterId>a3a2e730-0dc3-47e6-bac6-4c056d5e2aee</dataCenterId>
<dataCenterVersion>6</dataCenterVersion>
<nicId>f1c7a244-2fa6-44ee-8fb6-871f337683a3</nicId>
<lanId>1</lanId>
<internetAccess>false</internetAccess>
<serverId>c09f4f31-336c-4ad2-9ec7-591778513408</serverId>
<ips>10.10.38.12</ips>
<macAddress>02:01:96:d7:60:e0</macAddress>
<firewall>
<active>false</active>
<firewallId>01490a19-2b20-43cc-86a4-ff0b0460f076</firewallId>
<nicId>f1c7a244-2fa6-44ee-8fb6-871f337683a3</nicId>
<provisioningState>AVAILABLE</provisioningState>
</firewall>
<dhcpActive>true</dhcpActive>
<provisioningState>AVAILABLE</provisioningState>
</return>
</ns2:getNicResponse>
</S:Body>
</S:Envelope>
77 changes: 77 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/ex_describe_node.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getServerResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3706813</requestId>
<dataCenterId>a3a2e730-0dc3-47e6-bac6-4c056d5e2aee</dataCenterId>
<dataCenterVersion>6</dataCenterVersion>
<serverId>c09f4f31-336c-4ad2-9ec7-591778513408</serverId>
<serverName>server001</serverName>
<cores>1</cores>
<ram>1024</ram>
<internetAccess>true</internetAccess>
<ips>10.10.38.12</ips>
<ips>162.254.26.14</ips>
<connectedStorages>
<bootDevice>true</bootDevice>
<busType>VIRTIO</busType>
<deviceNumber>1</deviceNumber>
<size>50</size>
<storageId>addb19d8-e664-43c1-bd2d-ad9210edc610</storageId>
<storageName>storage001</storageName>
</connectedStorages>
<nics>
<dataCenterId>a3a2e730-0dc3-47e6-bac6-4c056d5e2aee</dataCenterId>
<dataCenterVersion>6</dataCenterVersion>
<nicId>f1c7a244-2fa6-44ee-8fb6-871f337683a3</nicId>
<lanId>1</lanId>
<internetAccess>false</internetAccess>
<serverId>c09f4f31-336c-4ad2-9ec7-591778513408</serverId>
<ips>10.10.38.12</ips>
<macAddress>02:01:96:d7:60:e0</macAddress>
<firewall>
<active>false</active>
<firewallId>01490a19-2b20-43cc-86a4-ff0b0460f076</firewallId>
<nicId>f1c7a244-2fa6-44ee-8fb6-871f337683a3</nicId>
<provisioningState>AVAILABLE</provisioningState>
</firewall>
<dhcpActive>true</dhcpActive>
<provisioningState>AVAILABLE</provisioningState>
</nics>
<nics>
<dataCenterId>a3a2e730-0dc3-47e6-bac6-4c056d5e2aee</dataCenterId>
<dataCenterVersion>6</dataCenterVersion>
<nicId>e6263870-cd70-42e4-956a-00f3bbec70e3</nicId>
<nicName>PUBLIC</nicName>
<lanId>3</lanId>
<internetAccess>true</internetAccess>
<serverId>c09f4f31-336c-4ad2-9ec7-591778513408</serverId>
<ips>162.254.26.14</ips>
<macAddress>02:01:9c:53:c3:50</macAddress>
<firewall>
<active>false</active>
<firewallId>c0fa291e-38c2-48a6-bd15-b66ba54ac18a</firewallId>
<nicId>e6263870-cd70-42e4-956a-00f3bbec70e3</nicId>
<provisioningState>AVAILABLE</provisioningState>
</firewall>
<dhcpActive>false</dhcpActive>
<gatewayIp>162.254.26.1</gatewayIp>
<provisioningState>AVAILABLE</provisioningState>
</nics>
<provisioningState>AVAILABLE</provisioningState>
<virtualMachineState>RUNNING</virtualMachineState>
<creationTime>2014-07-16T18:53:05.109Z</creationTime>
<lastModificationTime>2014-07-16T19:57:51.577Z</lastModificationTime>
<osType>LINUX</osType>
<availabilityZone>AUTO</availabilityZone>
<cpuHotPlug>true</cpuHotPlug>
<ramHotPlug>true</ramHotPlug>
<nicHotPlug>true</nicHotPlug>
<nicHotUnPlug>true</nicHotUnPlug>
<discVirtioHotPlug>true</discVirtioHotPlug>
<discVirtioHotUnPlug>true</discVirtioHotUnPlug>
</return>
</ns2:getServerResponse>
</S:Body>
</S:Envelope>
22 changes: 22 additions & 0 deletions libcloud/test/compute/fixtures/profitbricks/ex_describe_volume.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getStorageResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3767716</requestId>
<dataCenterId>905f1346-d199-425d-a035-7dc28f6819cd</dataCenterId>
<dataCenterVersion>2</dataCenterVersion>
<storageId>00d0b9e7-e016-456f-85a0-517aa9a34bf5</storageId>
<size>50</size>
<storageName>StackPointCloud-Volume</storageName>
<mountImage>
<imageId>cd59b162-0289-11e4-9f63-52540066fee9</imageId>
<imageName>Debian-7-server-2014-07-01</imageName>
</mountImage>
<provisioningState>AVAILABLE</provisioningState>
<creationTime>2014-07-21T17:37:45.958Z</creationTime>
<lastModificationTime>2014-07-21T17:37:45.958Z</lastModificationTime>
</return>
</ns2:getStorageResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:deleteDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3339313</requestId>
</return>
</ns2:deleteDataCenterResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:deleteNicResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<requestId>3634902</requestId>
<dataCenterId>c2df1871-6aac-458e-ad1a-ef3f530cb7aa</dataCenterId>
<dataCenterVersion>31</dataCenterVersion>
</return>
</ns2:deleteNicResponse>
</S:Body>
</S:Envelope>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getAllDataCentersResponse xmlns:ns2="http://ws.api.profitbricks.com/">
<return>
<dataCenterId>a3e6f83a-8982-4d6a-aebc-60baf5755ede</dataCenterId>
<dataCenterName>StackPointCloud</dataCenterName>
<dataCenterVersion>1</dataCenterVersion>
<provisioningState>AVAILABLE</provisioningState>
</return>
<return>
<dataCenterId>c68f77b8-7ecb-40e9-8b41-79415dffc0f1</dataCenterId>
<dataCenterName>XYZ</dataCenterName>
<dataCenterVersion>2</dataCenterVersion>
<provisioningState>AVAILABLE</provisioningState>
</return>
</ns2:getAllDataCentersResponse>
</S:Body>
</S:Envelope>
Loading