Browse code

Fix interface id returned from VmxGuestinfo datasource

Change-Id: Iad562928a560890ee6a088582ce00aebc5485784
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3835
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George

suezzelur authored on 2017/09/22 04:10:29
Showing 2 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 Name:           cloud-init
4 4
 Version:        0.7.9
5
-Release:        10%{?dist}
5
+Release:        11%{?dist}
6 6
 Summary:        Cloud instance init scripts
7 7
 Group:          System Environment/Base
8 8
 License:        GPLv3
... ...
@@ -134,6 +134,8 @@ rm -rf $RPM_BUILD_ROOT
134 134
 
135 135
 
136 136
 %changelog
137
+*   Wed Sep 21 2017 Anish Swaminathan <anishs@vmware.com> 0.7.9-11
138
+-   Fix the interface id returned from vmxguestinfo
137 139
 *   Tue Aug 22 2017 Chang Lee <changlee@vmware.com> 0.7.9-10
138 140
 -   Fixed %check
139 141
 *   Wed Jul 19 2017 Divya Thaluru <dthaluru@vmware.com> 0.7.9-9
... ...
@@ -1,7 +1,7 @@
1 1
 diff -rupN cloud-init-0.7.9/cloudinit/sources/DataSourceVmxGuestinfo.py cloud-init-0.7.9-new/cloudinit/sources/DataSourceVmxGuestinfo.py
2 2
 --- cloud-init-0.7.9/cloudinit/sources/DataSourceVmxGuestinfo.py	1969-12-31 16:00:00.000000000 -0800
3 3
 +++ cloud-init-0.7.9-new/cloudinit/sources/DataSourceVmxGuestinfo.py	2017-05-08 07:47:27.388662680 -0700
4
-@@ -0,0 +1,144 @@
4
+@@ -0,0 +1,145 @@
5 5
 +# vi: ts=4 expandtab
6 6
 +#
7 7
 +# Copyright (C) 2017 VMware Inc.
... ...
@@ -122,7 +122,8 @@ diff -rupN cloud-init-0.7.9/cloudinit/sources/DataSourceVmxGuestinfo.py cloud-in
122 122
 +            else:
123 123
 +                found = False
124 124
 +            dev_index += 1
125
-+        self.distro.apply_network(network_settings)
125
++        self.distro.apply_network(network_settings, False)
126
++        return True
126 127
 +
127 128
 +    def _get_guestinfo_value(self, key):
128 129
 +        LOG.debug("Getting guestinfo value for key %s", key)
... ...
@@ -139,7 +140,7 @@ diff -rupN cloud-init-0.7.9/cloudinit/sources/DataSourceVmxGuestinfo.py cloud-in
139 139
 +
140 140
 +    def get_instance_id(self):
141 141
 +        with open('/sys/class/dmi/id/product_uuid', 'r') as id_file:
142
-+            return str(f.read()).rstrip()
142
++            return str(id_file.read()).rstrip()
143 143
 +
144 144
 +def get_datasource_list(depends):
145 145
 +    """