Skip to content

Commit 98764a6

Browse files
authored
Merge branch 'trunk' into update_changes
2 parents d8846a6 + 84206fb commit 98764a6

11 files changed

Lines changed: 11 additions & 42 deletions

File tree

libcloud/common/google.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _from_utc_timestamp(timestamp):
126126

127127
def _get_gce_metadata(path="", retry_failed: Optional[bool] = None):
128128
try:
129-
url = "http://metadata/computeMetadata/v1/" + path.lstrip("/")
129+
url = "http://metadata.google.internal/computeMetadata/v1/" + path.lstrip("/")
130130
headers = {"Metadata-Flavor": "Google"}
131131
response = get_response_object(url, headers=headers, retry_failed=retry_failed)
132132
return response.status, "", response.body

libcloud/compute/drivers/openstack.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2473,6 +2473,7 @@ def _to_node(self, api_node):
24732473
power_state=api_node.get("OS-EXT-STS:power_state", None),
24742474
progress=api_node.get("progress", None),
24752475
fault=api_node.get("fault"),
2476+
hypervisor_hostname=api_node.get("OS-EXT-SRV-ATTR:hypervisor_hostname"),
24762477
),
24772478
)
24782479

libcloud/dns/drivers/cloudflare.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,6 @@ def _to_zone(self, item):
516516

517517
def _to_record(self, zone, item):
518518
name = item["name"]
519-
name = name.replace("." + item["zone_name"], "")
520-
name = name.replace(item["zone_name"], "")
521519
name = name or None
522520

523521
ttl = item.get("ttl")

libcloud/test/compute/fixtures/gce/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"key": "startup-script",
18-
"value": "#!/bin/bash\n\nAUTO_SCRIPT=$(curl -s http://metadata/computeMetadata/v1/instance/attributes/my-auto-script -H \"Metadata-Flavor: Google\")\nCHECK=${AUTO_SCRIPT:-disabled}\n\nif [ \"${CHECK}\" = \"enabled\" -a -f /etc/debian_version ]; then\n export DEBIAN_FRONTEND=noninteractive\n apt-get -q -y update\n apt-get -q -y install git vim tmux\n fi\nexit 0\n"
18+
"value": "#!/bin/bash\n\nAUTO_SCRIPT=$(curl -s http://metadata.google.internal/computeMetadata/v1/instance/attributes/my-auto-script -H \"Metadata-Flavor: Google\")\nCHECK=${AUTO_SCRIPT:-disabled}\n\nif [ \"${CHECK}\" = \"enabled\" -a -f /etc/debian_version ]; then\n export DEBIAN_FRONTEND=noninteractive\n apt-get -q -y update\n apt-get -q -y install git vim tmux\n fi\nexit 0\n"
1919
}
2020
]
2121
},

libcloud/test/dns/fixtures/cloudflare/record_GET.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"proxied": true,
99
"ttl": 1,
1010
"locked": false,
11-
"zone_id": "1234",
12-
"zone_name": "example.com",
1311
"modified_on": "2018-12-22T21:28:00.801892Z",
1412
"created_on": "2018-12-22T21:28:00.801892Z",
1513
"meta": {

libcloud/test/dns/fixtures/cloudflare/record_PUT.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"proxied": true,
99
"ttl": 1,
1010
"locked": false,
11-
"zone_id": "1234",
12-
"zone_name": "example.com",
1311
"modified_on": "2018-12-22T21:28:00.801892Z",
1412
"created_on": "2018-12-22T21:28:00.801892Z",
1513
"meta": {

libcloud/test/dns/fixtures/cloudflare/records_GET_1.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"proxied": true,
1010
"ttl": 1,
1111
"locked": false,
12-
"zone_id": "1234",
13-
"zone_name": "example.com",
1412
"modified_on": "2018-12-22T21:28:00.801892Z",
1513
"created_on": "2018-12-22T21:28:00.801892Z",
1614
"meta": {
@@ -28,8 +26,6 @@
2826
"proxied": true,
2927
"ttl": 1,
3028
"locked": false,
31-
"zone_id": "1234",
32-
"zone_name": "example.com",
3329
"modified_on": "2018-12-22T21:28:03.346998Z",
3430
"created_on": "2018-12-22T21:28:03.346998Z",
3531
"meta": {
@@ -47,8 +43,6 @@
4743
"proxied": false,
4844
"ttl": 1,
4945
"locked": false,
50-
"zone_id": "1234",
51-
"zone_name": "example.com",
5246
"modified_on": "2018-12-22T20:29:48.453923Z",
5347
"created_on": "2018-12-22T20:29:48.453923Z",
5448
"meta": {
@@ -66,8 +60,6 @@
6660
"proxied": false,
6761
"ttl": 1,
6862
"locked": false,
69-
"zone_id": "1234",
70-
"zone_name": "example.com",
7163
"modified_on": "2019-05-30T01:43:01.509188Z",
7264
"created_on": "2019-05-30T01:43:01.509188Z",
7365
"meta": {
@@ -85,8 +77,6 @@
8577
"proxied": true,
8678
"ttl": 1,
8779
"locked": false,
88-
"zone_id": "1234",
89-
"zone_name": "example.com",
9080
"modified_on": "2018-12-22T21:29:46.874918Z",
9181
"created_on": "2018-12-22T21:29:46.874918Z",
9282
"meta": {
@@ -111,9 +101,7 @@
111101
"proxiable": false,
112102
"proxied": false,
113103
"ttl": 1,
114-
"type": "MX",
115-
"zone_id": "1234",
116-
"zone_name": "foo.bar"
104+
"type": "MX"
117105
}
118106
],
119107
"result_info": {

libcloud/test/dns/fixtures/cloudflare/records_GET_2.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
"ttl": 1,
1111
"priority": 1,
1212
"locked": false,
13-
"zone_id": "1234",
14-
"zone_name": "example.com",
1513
"modified_on": "2018-12-22T20:29:48.532399Z",
1614
"created_on": "2018-12-22T20:29:48.532399Z",
1715
"meta": {
@@ -30,8 +28,6 @@
3028
"ttl": 1,
3129
"priority": 2,
3230
"locked": false,
33-
"zone_id": "1234",
34-
"zone_name": "example.com",
3531
"modified_on": "2018-12-22T20:29:48.540671Z",
3632
"created_on": "2018-12-22T20:29:48.540671Z",
3733
"meta": {
@@ -49,8 +45,6 @@
4945
"proxied": false,
5046
"ttl": 1,
5147
"locked": false,
52-
"zone_id": "1234",
53-
"zone_name": "example.com",
5448
"modified_on": "2018-12-22T20:29:48.512931Z",
5549
"created_on": "2018-12-22T20:29:48.512931Z",
5650
"meta": {
@@ -68,8 +62,6 @@
6862
"proxied": false,
6963
"ttl": 1,
7064
"locked": false,
71-
"zone_id": "1234",
72-
"zone_name": "example.com",
7365
"modified_on": "2018-12-22T20:29:48.523230Z",
7466
"created_on": "2018-12-22T20:29:48.523230Z",
7567
"meta": {
@@ -80,8 +72,6 @@
8072
},
8173
{
8274
"id": "r8",
83-
"zone_id": "1234",
84-
"zone_name": "foo.bar",
8575
"name": "test1",
8676
"type": "CAA",
8777
"content": "0\tissue\ttest.example.com",

libcloud/test/dns/fixtures/cloudflare/records_POST.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"proxied": true,
99
"ttl": 1,
1010
"locked": false,
11-
"zone_id": "1234",
12-
"zone_name": "example.com",
1311
"modified_on": "2018-12-22T21:28:00.801892Z",
1412
"created_on": "2018-12-22T21:28:00.801892Z",
1513
"meta": {

libcloud/test/dns/fixtures/cloudflare/records_POST_sshfp.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"proxied": true,
99
"ttl": 1,
1010
"locked": false,
11-
"zone_id": "1234",
12-
"zone_name": "example.com",
1311
"modified_on": "2018-12-22T21:28:00.801892Z",
1412
"created_on": "2018-12-22T21:28:00.801892Z",
1513
"meta": {

0 commit comments

Comments
 (0)