Skip to content

Instantly share code, notes, and snippets.

cache:
max_age: 3600
clouds:
admin:
endpoint_type: admin
auth_type: v3token
auth:
auth_url: http://192.168.1.231:5000/v3
token: secretsecret
project_name: admin
clouds:
mycloud:
auth:
auth_url: https://keystone.example:443/v3
username: rami_alghanmi
password: 'XXXX'
project_id: myProjectID
region_name: reg1
@emonty
emonty / -
Created March 16, 2015 15:27
diff --git a/shade/meta.py b/shade/meta.py
index 90a60d5..55f1376 100644
--- a/shade/meta.py
+++ b/shade/meta.py
@@ -112,10 +112,15 @@ def get_hostvars_from_server(cloud, server, mounts=None):
if flavor_name:
server_vars['flavor']['name'] = flavor_name
- image_id = server.image['id']
- image_name = cloud.get_image_name(image_id)
@emonty
emonty / -
Created March 16, 2015 15:11
commit 867b376b78ce9487e3e6ef540630211b2721c373
Author: Monty Taylor <mordred@inaugust.com>
Date: Mon Mar 16 09:24:12 2015 -0400
Sometimes clouds have strings for image
Cisco OpenStack apparenty has moments where it can return the image info
in a string, rather than in a dict/object. Don't know why - but let's
handle it.
@emonty
emonty / -
Created March 16, 2015 15:10
commit 867b376b78ce9487e3e6ef540630211b2721c373
Author: Monty Taylor <mordred@inaugust.com>
Date: Mon Mar 16 09:24:12 2015 -0400
Sometimes clouds have strings for image
Cisco OpenStack apparenty has moments where it can return the image info
in a string, rather than in a dict/object. Don't know why - but let's
handle it.
@emonty
emonty / -
Created March 16, 2015 13:25
diff --git a/shade/meta.py b/shade/meta.py
index f17298c..86e9dd5 100644
--- a/shade/meta.py
+++ b/shade/meta.py
@@ -114,7 +114,7 @@ def get_hostvars_from_server(cloud, server, mounts=None):
# Cisco OpenStack can return a raw string here
if hasattr(server.image, '__getitem__'):
- image_id = server.image.get['id']
+ image_id = server.image['id']
@emonty
emonty / -
Created March 16, 2015 13:20
diff --git a/shade/meta.py b/shade/meta.py
index 90a60d5..f17298c 100644
--- a/shade/meta.py
+++ b/shade/meta.py
@@ -112,7 +112,11 @@ def get_hostvars_from_server(cloud, server, mounts=None):
if flavor_name:
server_vars['flavor']['name'] = flavor_name
- image_id = server.image['id']
+ # Cisco OpenStack can return a raw string here
# Test to see if config-drive exists. If not, skip and assume DHCP networking
# will work becasue sanity
if ! blkid -t LABEL="config-2" ; then
exit 0
fi
mkdir -p /mnt/config
mount /dev/disk/by-label/config-2 /mnt/config
python /usr/local/bin/read_vendor_json.py
@emonty
emonty / -
Created January 7, 2015 16:57
diff --git a/requirements.txt b/requirements.txt
index 6103033..c284bfd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -9,3 +9,4 @@ python-cinderclient
python-neutronclient
python-troveclient
python-ironicclient
+python-swiftclient
diff --git a/shade/__init__.py b/shade/__init__.py
### Keybase proof
I hereby claim:
* I am emonty on github.
* I am mordred (https://keybase.io/mordred) on keybase.
* I have a public key whose fingerprint is 9A93 6029 5805 662E 034A 7E70 3390 DB68 041A 12F0
To claim this, I am signing this object: