Merge lp:~fgimenez/snappy-tests-job/openstack-client into lp:snappy-tests-job

Proposed by Federico Gimenez
Status: Merged
Approved by: Leo Arias
Approved revision: 71
Merged at revision: 71
Proposed branch: lp:~fgimenez/snappy-tests-job/openstack-client
Merge into: lp:snappy-tests-job
Diff against target: 68 lines (+9/-10)
2 files modified
cloud/openstack.go (+7/-8)
cloud/openstack_test.go (+2/-2)
To merge this branch: bzr merge lp:~fgimenez/snappy-tests-job/openstack-client
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+282709@code.launchpad.net

Commit message

Updated cloud client from nova to the generric openstack client to prevent https://bugs.launchpad.net/ubuntu/+source/python-keystoneclient/+bug/1242992

Description of the change

Updated cloud client from nova to the generric openstack client to prevent https://bugs.launchpad.net/ubuntu/+source/python-keystoneclient/+bug/1242992

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloud/openstack.go'
2--- cloud/openstack.go 2015-12-01 03:50:02 +0000
3+++ cloud/openstack.go 2016-01-15 10:11:08 +0000
4@@ -35,10 +35,10 @@
5
6 const (
7 imgTpl = ".*custom.*%s-snappy-core-amd64-%s.*"
8- listImagesCmd = "nova image-list"
9- launchInstanceCmdTpl = "nova boot --security-groups ssh --flavor %s --image %s test-%d"
10- describeInstanceCmdTpl = "nova show %s"
11- killInstanceCmdTpl = "nova delete %s"
12+ listImagesCmd = "openstack image list"
13+ launchInstanceCmdTpl = "openstack server create --security-group ssh --flavor %s --image %s test-%d"
14+ describeInstanceCmdTpl = "openstack server show %s"
15+ killInstanceCmdTpl = "openstack server delete %s"
16 maxAttempsInstanceWait = 10
17 secondsToWaitForInstance = 20
18 )
19@@ -199,7 +199,6 @@
20
21 for i := 0; i < maxAttempsInstanceWait; i++ {
22 output, _ := c.Util.ExecCommand(params)
23-
24 if instanceIP = extractInstanceIP(output); instanceIP == "" {
25 log.Print("IP not found, waiting...")
26
27@@ -232,7 +231,7 @@
28 | OS-SRV-USG:terminated_at | - |
29 | accessIPv4 | |
30 | accessIPv6 | |
31- | <networkid> network | instance_ip |
32+ | addresses | <networkid>=instance_ip |
33 | config_drive | |
34 | created | 2015-07-27T09:28:49Z |
35 | flavor | m1.small (2) |
36@@ -262,8 +261,8 @@
37 line := scanner.Text()
38 fields := strings.Fields(line)
39
40- if len(fields) > 3 && fields[2] == "network" {
41- instanceIP = fields[4]
42+ if len(fields) > 4 && fields[1] == "addresses" {
43+ instanceIP = strings.Split(fields[3], "=")[1]
44 break
45 }
46 }
47
48=== modified file 'cloud/openstack_test.go'
49--- cloud/openstack_test.go 2015-12-01 03:43:15 +0000
50+++ cloud/openstack_test.go 2016-01-15 10:11:08 +0000
51@@ -31,7 +31,7 @@
52 )
53
54 const (
55- defaultFlavor = "m1.quitelarge"
56+ defaultFlavor = "m1.quitelarge"
57 defaultRelease = "1504"
58 defaultChannel = "edge"
59 imageListTpl = `| e37ef727-014d-48e8-b0e4-94cf39e1dbbc | ubuntu-released/ubuntu-wily-alpha1-amd64-server-20150624-disk1.img | ACTIVE | |
60@@ -84,7 +84,7 @@
61 | OS-SRV-USG:terminated_at | - |
62 | accessIPv4 | |
63 | accessIPv6 | |
64-| generic_networkid_string network | %s |
65+| addresses | generic_networkid_string=%s |
66 | config_drive | |
67 | created | 2015-07-27T09:28:49Z |
68 | flavor | m1.small (2) |

Subscribers

People subscribed via source and target branches