Merge lp:~james-page/charms/trusty/neutron-openvswitch/16.01-resync into lp:~openstack-charmers-archive/charms/trusty/neutron-openvswitch/next

Proposed by James Page
Status: Merged
Merged at revision: 105
Proposed branch: lp:~james-page/charms/trusty/neutron-openvswitch/16.01-resync
Merge into: lp:~openstack-charmers-archive/charms/trusty/neutron-openvswitch/next
Diff against target: 476 lines (+127/-67)
6 files modified
hooks/charmhelpers/contrib/openstack/amulet/deployment.py (+2/-1)
hooks/charmhelpers/contrib/openstack/neutron.py (+14/-6)
hooks/charmhelpers/contrib/openstack/utils.py (+63/-30)
hooks/charmhelpers/core/host.py (+41/-26)
hooks/charmhelpers/fetch/giturl.py (+5/-3)
tests/charmhelpers/contrib/openstack/amulet/deployment.py (+2/-1)
To merge this branch: bzr merge lp:~james-page/charms/trusty/neutron-openvswitch/16.01-resync
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+283933@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

Approved assuming osci is happy

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #16948 neutron-openvswitch-next for james-page mp283933
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/16948/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #18189 neutron-openvswitch-next for james-page mp283933
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/18189/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #9064 neutron-openvswitch-next for james-page mp283933
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/14674425/
Build: http://10.245.162.77:8080/job/charm_amulet_test/9064/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #9066 neutron-openvswitch-next for james-page mp283933
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/14675971/
Build: http://10.245.162.77:8080/job/charm_amulet_test/9066/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #9096 neutron-openvswitch-next for james-page mp283933
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/9096/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/charmhelpers/contrib/openstack/amulet/deployment.py'
--- hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2016-01-08 13:11:21 +0000
+++ hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2016-01-26 12:00:08 +0000
@@ -125,7 +125,8 @@
125125
126 # Charms which can not use openstack-origin, ie. many subordinates126 # Charms which can not use openstack-origin, ie. many subordinates
127 no_origin = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe',127 no_origin = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe',
128 'openvswitch-odl', 'neutron-api-odl', 'odl-controller']128 'openvswitch-odl', 'neutron-api-odl', 'odl-controller',
129 'cinder-backup']
129130
130 if self.openstack:131 if self.openstack:
131 for svc in services:132 for svc in services:
132133
=== modified file 'hooks/charmhelpers/contrib/openstack/neutron.py'
--- hooks/charmhelpers/contrib/openstack/neutron.py 2016-01-08 13:11:21 +0000
+++ hooks/charmhelpers/contrib/openstack/neutron.py 2016-01-26 12:00:08 +0000
@@ -50,7 +50,7 @@
50 if kernel_version() >= (3, 13):50 if kernel_version() >= (3, 13):
51 return []51 return []
52 else:52 else:
53 return ['openvswitch-datapath-dkms']53 return [headers_package(), 'openvswitch-datapath-dkms']
5454
5555
56# legacy56# legacy
@@ -70,7 +70,7 @@
70 relation_prefix='neutron',70 relation_prefix='neutron',
71 ssl_dir=QUANTUM_CONF_DIR)],71 ssl_dir=QUANTUM_CONF_DIR)],
72 'services': ['quantum-plugin-openvswitch-agent'],72 'services': ['quantum-plugin-openvswitch-agent'],
73 'packages': [[headers_package()] + determine_dkms_package(),73 'packages': [determine_dkms_package(),
74 ['quantum-plugin-openvswitch-agent']],74 ['quantum-plugin-openvswitch-agent']],
75 'server_packages': ['quantum-server',75 'server_packages': ['quantum-server',
76 'quantum-plugin-openvswitch'],76 'quantum-plugin-openvswitch'],
@@ -111,7 +111,7 @@
111 relation_prefix='neutron',111 relation_prefix='neutron',
112 ssl_dir=NEUTRON_CONF_DIR)],112 ssl_dir=NEUTRON_CONF_DIR)],
113 'services': ['neutron-plugin-openvswitch-agent'],113 'services': ['neutron-plugin-openvswitch-agent'],
114 'packages': [[headers_package()] + determine_dkms_package(),114 'packages': [determine_dkms_package(),
115 ['neutron-plugin-openvswitch-agent']],115 ['neutron-plugin-openvswitch-agent']],
116 'server_packages': ['neutron-server',116 'server_packages': ['neutron-server',
117 'neutron-plugin-openvswitch'],117 'neutron-plugin-openvswitch'],
@@ -155,7 +155,7 @@
155 relation_prefix='neutron',155 relation_prefix='neutron',
156 ssl_dir=NEUTRON_CONF_DIR)],156 ssl_dir=NEUTRON_CONF_DIR)],
157 'services': [],157 'services': [],
158 'packages': [[headers_package()] + determine_dkms_package(),158 'packages': [determine_dkms_package(),
159 ['neutron-plugin-cisco']],159 ['neutron-plugin-cisco']],
160 'server_packages': ['neutron-server',160 'server_packages': ['neutron-server',
161 'neutron-plugin-cisco'],161 'neutron-plugin-cisco'],
@@ -174,7 +174,7 @@
174 'neutron-dhcp-agent',174 'neutron-dhcp-agent',
175 'nova-api-metadata',175 'nova-api-metadata',
176 'etcd'],176 'etcd'],
177 'packages': [[headers_package()] + determine_dkms_package(),177 'packages': [determine_dkms_package(),
178 ['calico-compute',178 ['calico-compute',
179 'bird',179 'bird',
180 'neutron-dhcp-agent',180 'neutron-dhcp-agent',
@@ -219,7 +219,7 @@
219 relation_prefix='neutron',219 relation_prefix='neutron',
220 ssl_dir=NEUTRON_CONF_DIR)],220 ssl_dir=NEUTRON_CONF_DIR)],
221 'services': [],221 'services': [],
222 'packages': [[headers_package()] + determine_dkms_package()],222 'packages': [determine_dkms_package()],
223 'server_packages': ['neutron-server',223 'server_packages': ['neutron-server',
224 'python-neutron-plugin-midonet'],224 'python-neutron-plugin-midonet'],
225 'server_services': ['neutron-server']225 'server_services': ['neutron-server']
@@ -233,6 +233,14 @@
233 'neutron-plugin-ml2']233 'neutron-plugin-ml2']
234 # NOTE: patch in vmware renames nvp->nsx for icehouse onwards234 # NOTE: patch in vmware renames nvp->nsx for icehouse onwards
235 plugins['nvp'] = plugins['nsx']235 plugins['nvp'] = plugins['nsx']
236 if release >= 'kilo':
237 plugins['midonet']['driver'] = (
238 'neutron.plugins.midonet.plugin.MidonetPluginV2')
239 if release >= 'liberty':
240 midonet_origin = config('midonet-origin')
241 if midonet_origin is not None and midonet_origin[4:5] == '1':
242 plugins['midonet']['driver'] = (
243 'midonet.neutron.plugin_v1.MidonetPluginV2')
236 return plugins244 return plugins
237245
238246
239247
=== modified file 'hooks/charmhelpers/contrib/openstack/utils.py'
--- hooks/charmhelpers/contrib/openstack/utils.py 2016-01-08 21:04:45 +0000
+++ hooks/charmhelpers/contrib/openstack/utils.py 2016-01-26 12:00:08 +0000
@@ -103,29 +103,28 @@
103 ('2016.1', 'mitaka'),103 ('2016.1', 'mitaka'),
104])104])
105105
106# The ugly duckling106# The ugly duckling - must list releases oldest to newest
107SWIFT_CODENAMES = OrderedDict([107SWIFT_CODENAMES = OrderedDict([
108 ('1.4.3', 'diablo'),108 ('diablo',
109 ('1.4.8', 'essex'),109 ['1.4.3']),
110 ('1.7.4', 'folsom'),110 ('essex',
111 ('1.8.0', 'grizzly'),111 ['1.4.8']),
112 ('1.7.7', 'grizzly'),112 ('folsom',
113 ('1.7.6', 'grizzly'),113 ['1.7.4']),
114 ('1.10.0', 'havana'),114 ('grizzly',
115 ('1.9.1', 'havana'),115 ['1.7.6', '1.7.7', '1.8.0']),
116 ('1.9.0', 'havana'),116 ('havana',
117 ('1.13.1', 'icehouse'),117 ['1.9.0', '1.9.1', '1.10.0']),
118 ('1.13.0', 'icehouse'),118 ('icehouse',
119 ('1.12.0', 'icehouse'),119 ['1.11.0', '1.12.0', '1.13.0', '1.13.1']),
120 ('1.11.0', 'icehouse'),120 ('juno',
121 ('2.0.0', 'juno'),121 ['2.0.0', '2.1.0', '2.2.0']),
122 ('2.1.0', 'juno'),122 ('kilo',
123 ('2.2.0', 'juno'),123 ['2.2.1', '2.2.2']),
124 ('2.2.1', 'kilo'),124 ('liberty',
125 ('2.2.2', 'kilo'),125 ['2.3.0', '2.4.0', '2.5.0']),
126 ('2.3.0', 'liberty'),126 ('mitaka',
127 ('2.4.0', 'liberty'),127 ['2.5.0']),
128 ('2.5.0', 'liberty'),
129])128])
130129
131# >= Liberty version->codename mapping130# >= Liberty version->codename mapping
@@ -227,6 +226,33 @@
227 error_out(e)226 error_out(e)
228227
229228
229def get_os_version_codename_swift(codename):
230 '''Determine OpenStack version number of swift from codename.'''
231 for k, v in six.iteritems(SWIFT_CODENAMES):
232 if k == codename:
233 return v[-1]
234 e = 'Could not derive swift version for '\
235 'codename: %s' % codename
236 error_out(e)
237
238
239def get_swift_codename(version):
240 '''Determine OpenStack codename that corresponds to swift version.'''
241 codenames = [k for k, v in six.iteritems(SWIFT_CODENAMES) if version in v]
242 if len(codenames) > 1:
243 # If more than one release codename contains this version we determine
244 # the actual codename based on the highest available install source.
245 for codename in reversed(codenames):
246 releases = UBUNTU_OPENSTACK_RELEASE
247 release = [k for k, v in six.iteritems(releases) if codename in v]
248 ret = subprocess.check_output(['apt-cache', 'policy', 'swift'])
249 if codename in ret or release[0] in ret:
250 return codename
251 elif len(codenames) == 1:
252 return codenames[0]
253 return None
254
255
230def get_os_codename_package(package, fatal=True):256def get_os_codename_package(package, fatal=True):
231 '''Derive OpenStack release codename from an installed package.'''257 '''Derive OpenStack release codename from an installed package.'''
232 import apt_pkg as apt258 import apt_pkg as apt
@@ -270,7 +296,7 @@
270 # < Liberty co-ordinated project versions296 # < Liberty co-ordinated project versions
271 try:297 try:
272 if 'swift' in pkg.name:298 if 'swift' in pkg.name:
273 return SWIFT_CODENAMES[vers]299 return get_swift_codename(vers)
274 else:300 else:
275 return OPENSTACK_CODENAMES[vers]301 return OPENSTACK_CODENAMES[vers]
276 except KeyError:302 except KeyError:
@@ -289,12 +315,14 @@
289315
290 if 'swift' in pkg:316 if 'swift' in pkg:
291 vers_map = SWIFT_CODENAMES317 vers_map = SWIFT_CODENAMES
318 for cname, version in six.iteritems(vers_map):
319 if cname == codename:
320 return version[-1]
292 else:321 else:
293 vers_map = OPENSTACK_CODENAMES322 vers_map = OPENSTACK_CODENAMES
294323 for version, cname in six.iteritems(vers_map):
295 for version, cname in six.iteritems(vers_map):324 if cname == codename:
296 if cname == codename:325 return version
297 return version
298 # e = "Could not determine OpenStack version for package: %s" % pkg326 # e = "Could not determine OpenStack version for package: %s" % pkg
299 # error_out(e)327 # error_out(e)
300328
@@ -460,11 +488,16 @@
460 cur_vers = get_os_version_package(package)488 cur_vers = get_os_version_package(package)
461 if "swift" in package:489 if "swift" in package:
462 codename = get_os_codename_install_source(src)490 codename = get_os_codename_install_source(src)
463 available_vers = get_os_version_codename(codename, SWIFT_CODENAMES)491 avail_vers = get_os_version_codename_swift(codename)
464 else:492 else:
465 available_vers = get_os_version_install_source(src)493 avail_vers = get_os_version_install_source(src)
466 apt.init()494 apt.init()
467 return apt.version_compare(available_vers, cur_vers) == 1495 if "swift" in package:
496 major_cur_vers = cur_vers.split('.', 1)[0]
497 major_avail_vers = avail_vers.split('.', 1)[0]
498 major_diff = apt.version_compare(major_avail_vers, major_cur_vers)
499 return avail_vers > cur_vers and (major_diff == 1 or major_diff == 0)
500 return apt.version_compare(avail_vers, cur_vers) == 1
468501
469502
470def ensure_block_device(block_device):503def ensure_block_device(block_device):
471504
=== modified file 'hooks/charmhelpers/core/host.py'
--- hooks/charmhelpers/core/host.py 2016-01-08 21:04:45 +0000
+++ hooks/charmhelpers/core/host.py 2016-01-26 12:00:08 +0000
@@ -138,7 +138,8 @@
138 except subprocess.CalledProcessError:138 except subprocess.CalledProcessError:
139 return False139 return False
140 else:140 else:
141 if ("start/running" in output or "is running" in output):141 if ("start/running" in output or "is running" in output or
142 "up and running" in output):
142 return True143 return True
143 else:144 else:
144 return False145 return False
@@ -160,13 +161,13 @@
160161
161162
162def init_is_systemd():163def init_is_systemd():
164 """Return True if the host system uses systemd, False otherwise."""
163 return os.path.isdir(SYSTEMD_SYSTEM)165 return os.path.isdir(SYSTEMD_SYSTEM)
164166
165167
166def adduser(username, password=None, shell='/bin/bash', system_user=False,168def adduser(username, password=None, shell='/bin/bash', system_user=False,
167 primary_group=None, secondary_groups=None):169 primary_group=None, secondary_groups=None):
168 """170 """Add a user to the system.
169 Add a user to the system.
170171
171 Will log but otherwise succeed if the user already exists.172 Will log but otherwise succeed if the user already exists.
172173
@@ -174,7 +175,7 @@
174 :param str password: Password for user; if ``None``, create a system user175 :param str password: Password for user; if ``None``, create a system user
175 :param str shell: The default shell for the user176 :param str shell: The default shell for the user
176 :param bool system_user: Whether to create a login or system user177 :param bool system_user: Whether to create a login or system user
177 :param str primary_group: Primary group for user; defaults to their username178 :param str primary_group: Primary group for user; defaults to username
178 :param list secondary_groups: Optional list of additional groups179 :param list secondary_groups: Optional list of additional groups
179180
180 :returns: The password database entry struct, as returned by `pwd.getpwnam`181 :returns: The password database entry struct, as returned by `pwd.getpwnam`
@@ -300,14 +301,12 @@
300301
301302
302def fstab_remove(mp):303def fstab_remove(mp):
303 """Remove the given mountpoint entry from /etc/fstab304 """Remove the given mountpoint entry from /etc/fstab"""
304 """
305 return Fstab.remove_by_mountpoint(mp)305 return Fstab.remove_by_mountpoint(mp)
306306
307307
308def fstab_add(dev, mp, fs, options=None):308def fstab_add(dev, mp, fs, options=None):
309 """Adds the given device entry to the /etc/fstab file309 """Adds the given device entry to the /etc/fstab file"""
310 """
311 return Fstab.add(dev, mp, fs, options=options)310 return Fstab.add(dev, mp, fs, options=options)
312311
313312
@@ -363,8 +362,7 @@
363362
364363
365def file_hash(path, hash_type='md5'):364def file_hash(path, hash_type='md5'):
366 """365 """Generate a hash checksum of the contents of 'path' or None if not found.
367 Generate a hash checksum of the contents of 'path' or None if not found.
368366
369 :param str hash_type: Any hash alrgorithm supported by :mod:`hashlib`,367 :param str hash_type: Any hash alrgorithm supported by :mod:`hashlib`,
370 such as md5, sha1, sha256, sha512, etc.368 such as md5, sha1, sha256, sha512, etc.
@@ -379,10 +377,9 @@
379377
380378
381def path_hash(path):379def path_hash(path):
382 """380 """Generate a hash checksum of all files matching 'path'. Standard
383 Generate a hash checksum of all files matching 'path'. Standard wildcards381 wildcards like '*' and '?' are supported, see documentation for the 'glob'
384 like '*' and '?' are supported, see documentation for the 'glob' module for382 module for more information.
385 more information.
386383
387 :return: dict: A { filename: hash } dictionary for all matched files.384 :return: dict: A { filename: hash } dictionary for all matched files.
388 Empty if none found.385 Empty if none found.
@@ -394,8 +391,7 @@
394391
395392
396def check_hash(path, checksum, hash_type='md5'):393def check_hash(path, checksum, hash_type='md5'):
397 """394 """Validate a file using a cryptographic checksum.
398 Validate a file using a cryptographic checksum.
399395
400 :param str checksum: Value of the checksum used to validate the file.396 :param str checksum: Value of the checksum used to validate the file.
401 :param str hash_type: Hash algorithm used to generate `checksum`.397 :param str hash_type: Hash algorithm used to generate `checksum`.
@@ -410,6 +406,7 @@
410406
411407
412class ChecksumError(ValueError):408class ChecksumError(ValueError):
409 """A class derived from Value error to indicate the checksum failed."""
413 pass410 pass
414411
415412
@@ -515,7 +512,7 @@
515512
516513
517def list_nics(nic_type=None):514def list_nics(nic_type=None):
518 '''Return a list of nics of given type(s)'''515 """Return a list of nics of given type(s)"""
519 if isinstance(nic_type, six.string_types):516 if isinstance(nic_type, six.string_types):
520 int_types = [nic_type]517 int_types = [nic_type]
521 else:518 else:
@@ -557,12 +554,13 @@
557554
558555
559def set_nic_mtu(nic, mtu):556def set_nic_mtu(nic, mtu):
560 '''Set MTU on a network interface'''557 """Set the Maximum Transmission Unit (MTU) on a network interface."""
561 cmd = ['ip', 'link', 'set', nic, 'mtu', mtu]558 cmd = ['ip', 'link', 'set', nic, 'mtu', mtu]
562 subprocess.check_call(cmd)559 subprocess.check_call(cmd)
563560
564561
565def get_nic_mtu(nic):562def get_nic_mtu(nic):
563 """Return the Maximum Transmission Unit (MTU) for a network interface."""
566 cmd = ['ip', 'addr', 'show', nic]564 cmd = ['ip', 'addr', 'show', nic]
567 ip_output = subprocess.check_output(cmd).decode('UTF-8').split('\n')565 ip_output = subprocess.check_output(cmd).decode('UTF-8').split('\n')
568 mtu = ""566 mtu = ""
@@ -574,6 +572,7 @@
574572
575573
576def get_nic_hwaddr(nic):574def get_nic_hwaddr(nic):
575 """Return the Media Access Control (MAC) for a network interface."""
577 cmd = ['ip', '-o', '-0', 'addr', 'show', nic]576 cmd = ['ip', '-o', '-0', 'addr', 'show', nic]
578 ip_output = subprocess.check_output(cmd).decode('UTF-8')577 ip_output = subprocess.check_output(cmd).decode('UTF-8')
579 hwaddr = ""578 hwaddr = ""
@@ -584,7 +583,7 @@
584583
585584
586def cmp_pkgrevno(package, revno, pkgcache=None):585def cmp_pkgrevno(package, revno, pkgcache=None):
587 '''Compare supplied revno with the revno of the installed package586 """Compare supplied revno with the revno of the installed package
588587
589 * 1 => Installed revno is greater than supplied arg588 * 1 => Installed revno is greater than supplied arg
590 * 0 => Installed revno is the same as supplied arg589 * 0 => Installed revno is the same as supplied arg
@@ -593,7 +592,7 @@
593 This function imports apt_cache function from charmhelpers.fetch if592 This function imports apt_cache function from charmhelpers.fetch if
594 the pkgcache argument is None. Be sure to add charmhelpers.fetch if593 the pkgcache argument is None. Be sure to add charmhelpers.fetch if
595 you call this function, or pass an apt_pkg.Cache() instance.594 you call this function, or pass an apt_pkg.Cache() instance.
596 '''595 """
597 import apt_pkg596 import apt_pkg
598 if not pkgcache:597 if not pkgcache:
599 from charmhelpers.fetch import apt_cache598 from charmhelpers.fetch import apt_cache
@@ -603,19 +602,27 @@
603602
604603
605@contextmanager604@contextmanager
606def chdir(d):605def chdir(directory):
606 """Change the current working directory to a different directory for a code
607 block and return the previous directory after the block exits. Useful to
608 run commands from a specificed directory.
609
610 :param str directory: The directory path to change to for this context.
611 """
607 cur = os.getcwd()612 cur = os.getcwd()
608 try:613 try:
609 yield os.chdir(d)614 yield os.chdir(directory)
610 finally:615 finally:
611 os.chdir(cur)616 os.chdir(cur)
612617
613618
614def chownr(path, owner, group, follow_links=True, chowntopdir=False):619def chownr(path, owner, group, follow_links=True, chowntopdir=False):
615 """620 """Recursively change user and group ownership of files and directories
616 Recursively change user and group ownership of files and directories
617 in given path. Doesn't chown path itself by default, only its children.621 in given path. Doesn't chown path itself by default, only its children.
618622
623 :param str path: The string path to start changing ownership.
624 :param str owner: The owner string to use when looking up the uid.
625 :param str group: The group string to use when looking up the gid.
619 :param bool follow_links: Also Chown links if True626 :param bool follow_links: Also Chown links if True
620 :param bool chowntopdir: Also chown path itself if True627 :param bool chowntopdir: Also chown path itself if True
621 """628 """
@@ -639,15 +646,23 @@
639646
640647
641def lchownr(path, owner, group):648def lchownr(path, owner, group):
649 """Recursively change user and group ownership of files and directories
650 in a given path, not following symbolic links. See the documentation for
651 'os.lchown' for more information.
652
653 :param str path: The string path to start changing ownership.
654 :param str owner: The owner string to use when looking up the uid.
655 :param str group: The group string to use when looking up the gid.
656 """
642 chownr(path, owner, group, follow_links=False)657 chownr(path, owner, group, follow_links=False)
643658
644659
645def get_total_ram():660def get_total_ram():
646 '''The total amount of system RAM in bytes.661 """The total amount of system RAM in bytes.
647662
648 This is what is reported by the OS, and may be overcommitted when663 This is what is reported by the OS, and may be overcommitted when
649 there are multiple containers hosted on the same machine.664 there are multiple containers hosted on the same machine.
650 '''665 """
651 with open('/proc/meminfo', 'r') as f:666 with open('/proc/meminfo', 'r') as f:
652 for line in f.readlines():667 for line in f.readlines():
653 if line:668 if line:
654669
=== modified file 'hooks/charmhelpers/fetch/giturl.py'
--- hooks/charmhelpers/fetch/giturl.py 2016-01-08 21:04:45 +0000
+++ hooks/charmhelpers/fetch/giturl.py 2016-01-26 12:00:08 +0000
@@ -15,7 +15,7 @@
15# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.15# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
1616
17import os17import os
18from subprocess import check_call18from subprocess import check_call, CalledProcessError
19from charmhelpers.fetch import (19from charmhelpers.fetch import (
20 BaseFetchHandler,20 BaseFetchHandler,
21 UnhandledSource,21 UnhandledSource,
@@ -49,8 +49,8 @@
49 cmd = ['git', '-C', dest, 'pull', source, branch]49 cmd = ['git', '-C', dest, 'pull', source, branch]
50 else:50 else:
51 cmd = ['git', 'clone', source, dest, '--branch', branch]51 cmd = ['git', 'clone', source, dest, '--branch', branch]
52 if depth:52 if depth:
53 cmd.extend(['--depth', depth])53 cmd.extend(['--depth', depth])
54 check_call(cmd)54 check_call(cmd)
5555
56 def install(self, source, branch="master", dest=None, depth=None):56 def install(self, source, branch="master", dest=None, depth=None):
@@ -63,6 +63,8 @@
63 branch_name)63 branch_name)
64 try:64 try:
65 self.clone(source, dest_dir, branch, depth)65 self.clone(source, dest_dir, branch, depth)
66 except CalledProcessError as e:
67 raise UnhandledSource(e)
66 except OSError as e:68 except OSError as e:
67 raise UnhandledSource(e.strerror)69 raise UnhandledSource(e.strerror)
68 return dest_dir70 return dest_dir
6971
=== modified file 'tests/charmhelpers/contrib/openstack/amulet/deployment.py'
--- tests/charmhelpers/contrib/openstack/amulet/deployment.py 2016-01-08 13:11:21 +0000
+++ tests/charmhelpers/contrib/openstack/amulet/deployment.py 2016-01-26 12:00:08 +0000
@@ -125,7 +125,8 @@
125125
126 # Charms which can not use openstack-origin, ie. many subordinates126 # Charms which can not use openstack-origin, ie. many subordinates
127 no_origin = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe',127 no_origin = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe',
128 'openvswitch-odl', 'neutron-api-odl', 'odl-controller']128 'openvswitch-odl', 'neutron-api-odl', 'odl-controller',
129 'cinder-backup']
129130
130 if self.openstack:131 if self.openstack:
131 for svc in services:132 for svc in services:

Subscribers

People subscribed via source and target branches