From bec2714e143176ec0c0cb34868996f7c7cec2e9d Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Thu, 21 Jun 2018 18:41:58 +0000 Subject: [PATCH] Sync charm-helpers for Rocky series support Change-Id: I4a02c8f11da5385deefd73638de7dc611b5f12d9 --- charmhelpers/contrib/openstack/amulet/deployment.py | 3 +++ charmhelpers/contrib/openstack/amulet/utils.py | 2 +- charmhelpers/contrib/openstack/utils.py | 4 ++++ charmhelpers/fetch/ubuntu.py | 8 ++++++++ tests/charmhelpers/contrib/openstack/amulet/deployment.py | 3 +++ tests/charmhelpers/contrib/openstack/amulet/utils.py | 2 +- tests/charmhelpers/contrib/openstack/utils.py | 4 ++++ tests/charmhelpers/fetch/ubuntu.py | 8 ++++++++ 8 files changed, 32 insertions(+), 2 deletions(-) diff --git a/charmhelpers/contrib/openstack/amulet/deployment.py b/charmhelpers/contrib/openstack/amulet/deployment.py index 66beeda..1c96752 100644 --- a/charmhelpers/contrib/openstack/amulet/deployment.py +++ b/charmhelpers/contrib/openstack/amulet/deployment.py @@ -291,6 +291,8 @@ class OpenStackAmuletDeployment(AmuletDeployment): ('zesty', None): self.zesty_ocata, ('artful', None): self.artful_pike, ('bionic', None): self.bionic_queens, + ('bionic', 'cloud:bionic-rocky'): self.bionic_rocky, + ('cosmic', None): self.cosmic_rocky, } return releases[(self.series, self.openstack)] @@ -306,6 +308,7 @@ class OpenStackAmuletDeployment(AmuletDeployment): ('zesty', 'ocata'), ('artful', 'pike'), ('bionic', 'queens'), + ('cosmic', 'rocky'), ]) if self.openstack: os_origin = self.openstack.split(':')[1] diff --git a/charmhelpers/contrib/openstack/amulet/utils.py b/charmhelpers/contrib/openstack/amulet/utils.py index d43038b..ef4ab54 100644 --- a/charmhelpers/contrib/openstack/amulet/utils.py +++ b/charmhelpers/contrib/openstack/amulet/utils.py @@ -56,7 +56,7 @@ OPENSTACK_RELEASES_PAIRS = [ 'trusty_mitaka', 'xenial_mitaka', 'xenial_newton', 'yakkety_newton', 'xenial_ocata', 'zesty_ocata', 'xenial_pike', 'artful_pike', 'xenial_queens', - 'bionic_queens'] + 'bionic_queens', 'bionic_rocky', 'cosmic_rocky'] class OpenStackAmuletUtils(AmuletUtils): diff --git a/charmhelpers/contrib/openstack/utils.py b/charmhelpers/contrib/openstack/utils.py index 6184abd..0180e55 100644 --- a/charmhelpers/contrib/openstack/utils.py +++ b/charmhelpers/contrib/openstack/utils.py @@ -133,6 +133,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([ ('zesty', 'ocata'), ('artful', 'pike'), ('bionic', 'queens'), + ('cosmic', 'rocky'), ]) @@ -151,6 +152,7 @@ OPENSTACK_CODENAMES = OrderedDict([ ('2017.1', 'ocata'), ('2017.2', 'pike'), ('2018.1', 'queens'), + ('2018.2', 'rocky'), ]) # The ugly duckling - must list releases oldest to newest @@ -183,6 +185,8 @@ SWIFT_CODENAMES = OrderedDict([ ['2.13.0', '2.15.0']), ('queens', ['2.16.0', '2.17.0']), + ('rocky', + ['2.18.0']), ]) # >= Liberty version->codename mapping diff --git a/charmhelpers/fetch/ubuntu.py b/charmhelpers/fetch/ubuntu.py index 653d58f..736be71 100644 --- a/charmhelpers/fetch/ubuntu.py +++ b/charmhelpers/fetch/ubuntu.py @@ -158,6 +158,14 @@ CLOUD_ARCHIVE_POCKETS = { 'queens/proposed': 'xenial-proposed/queens', 'xenial-queens/proposed': 'xenial-proposed/queens', 'xenial-proposed/queens': 'xenial-proposed/queens', + # Rocky + 'rocky': 'bionic-updates/rocky', + 'bionic-rocky': 'bionic-updates/rocky', + 'bionic-rocky/updates': 'bionic-updates/rocky', + 'bionic-updates/rocky': 'bionic-updates/rocky', + 'rocky/proposed': 'bionic-proposed/rocky', + 'bionic-rocky/proposed': 'bionic-proposed/rocky', + 'bionic-proposed/rocky': 'bionic-proposed/rocky', } diff --git a/tests/charmhelpers/contrib/openstack/amulet/deployment.py b/tests/charmhelpers/contrib/openstack/amulet/deployment.py index 66beeda..1c96752 100644 --- a/tests/charmhelpers/contrib/openstack/amulet/deployment.py +++ b/tests/charmhelpers/contrib/openstack/amulet/deployment.py @@ -291,6 +291,8 @@ class OpenStackAmuletDeployment(AmuletDeployment): ('zesty', None): self.zesty_ocata, ('artful', None): self.artful_pike, ('bionic', None): self.bionic_queens, + ('bionic', 'cloud:bionic-rocky'): self.bionic_rocky, + ('cosmic', None): self.cosmic_rocky, } return releases[(self.series, self.openstack)] @@ -306,6 +308,7 @@ class OpenStackAmuletDeployment(AmuletDeployment): ('zesty', 'ocata'), ('artful', 'pike'), ('bionic', 'queens'), + ('cosmic', 'rocky'), ]) if self.openstack: os_origin = self.openstack.split(':')[1] diff --git a/tests/charmhelpers/contrib/openstack/amulet/utils.py b/tests/charmhelpers/contrib/openstack/amulet/utils.py index d43038b..ef4ab54 100644 --- a/tests/charmhelpers/contrib/openstack/amulet/utils.py +++ b/tests/charmhelpers/contrib/openstack/amulet/utils.py @@ -56,7 +56,7 @@ OPENSTACK_RELEASES_PAIRS = [ 'trusty_mitaka', 'xenial_mitaka', 'xenial_newton', 'yakkety_newton', 'xenial_ocata', 'zesty_ocata', 'xenial_pike', 'artful_pike', 'xenial_queens', - 'bionic_queens'] + 'bionic_queens', 'bionic_rocky', 'cosmic_rocky'] class OpenStackAmuletUtils(AmuletUtils): diff --git a/tests/charmhelpers/contrib/openstack/utils.py b/tests/charmhelpers/contrib/openstack/utils.py index 6184abd..0180e55 100644 --- a/tests/charmhelpers/contrib/openstack/utils.py +++ b/tests/charmhelpers/contrib/openstack/utils.py @@ -133,6 +133,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([ ('zesty', 'ocata'), ('artful', 'pike'), ('bionic', 'queens'), + ('cosmic', 'rocky'), ]) @@ -151,6 +152,7 @@ OPENSTACK_CODENAMES = OrderedDict([ ('2017.1', 'ocata'), ('2017.2', 'pike'), ('2018.1', 'queens'), + ('2018.2', 'rocky'), ]) # The ugly duckling - must list releases oldest to newest @@ -183,6 +185,8 @@ SWIFT_CODENAMES = OrderedDict([ ['2.13.0', '2.15.0']), ('queens', ['2.16.0', '2.17.0']), + ('rocky', + ['2.18.0']), ]) # >= Liberty version->codename mapping diff --git a/tests/charmhelpers/fetch/ubuntu.py b/tests/charmhelpers/fetch/ubuntu.py index 653d58f..736be71 100644 --- a/tests/charmhelpers/fetch/ubuntu.py +++ b/tests/charmhelpers/fetch/ubuntu.py @@ -158,6 +158,14 @@ CLOUD_ARCHIVE_POCKETS = { 'queens/proposed': 'xenial-proposed/queens', 'xenial-queens/proposed': 'xenial-proposed/queens', 'xenial-proposed/queens': 'xenial-proposed/queens', + # Rocky + 'rocky': 'bionic-updates/rocky', + 'bionic-rocky': 'bionic-updates/rocky', + 'bionic-rocky/updates': 'bionic-updates/rocky', + 'bionic-updates/rocky': 'bionic-updates/rocky', + 'rocky/proposed': 'bionic-proposed/rocky', + 'bionic-rocky/proposed': 'bionic-proposed/rocky', + 'bionic-proposed/rocky': 'bionic-proposed/rocky', }