-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/2023.2] Build all images (#1361)
Depends-On: #1410
- Loading branch information
Showing
39 changed files
with
333 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
images/horizon/patches/horizon/0000-fix-ignore-errors-when-flavors-are-deleted.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
From aa21f4baa38fc70549b1c7341361519de6362d9b Mon Sep 17 00:00:00 2001 | ||
From: okozachenko <[email protected]> | ||
Date: Thu, 2 Nov 2023 01:27:20 +1100 | ||
Subject: [PATCH] fix: ignore errors when flavors are deleted | ||
|
||
The code used to list flavors when in the admin | ||
or project side was not consistent and raised | ||
alerts if viewing in the admin side but not in the | ||
project side. | ||
|
||
This patch moves their behaviour to be consistent | ||
and refactors the code to use the same code-base. | ||
|
||
Closes-Bug: #2042362 | ||
Change-Id: I37cc02102285b1e83ec1343b710a57fb5ac4ba15 | ||
--- | ||
.../dashboards/admin/instances/tests.py | 4 ---- | ||
.../dashboards/admin/instances/views.py | 17 +++++------------ | ||
.../dashboards/project/instances/tests.py | 1 + | ||
.../dashboards/project/instances/views.py | 11 +++-------- | ||
4 files changed, 9 insertions(+), 24 deletions(-) | ||
|
||
diff --git a/openstack_dashboard/dashboards/admin/instances/tests.py b/openstack_dashboard/dashboards/admin/instances/tests.py | ||
index 3630cb79a..c6cf65e5d 100644 | ||
--- a/openstack_dashboard/dashboards/admin/instances/tests.py | ||
+++ b/openstack_dashboard/dashboards/admin/instances/tests.py | ||
@@ -133,10 +133,6 @@ class InstanceViewTest(test.BaseAdminViewTests): | ||
res = self.client.get(INDEX_URL) | ||
instances = res.context['table'].data | ||
self.assertTemplateUsed(res, INDEX_TEMPLATE) | ||
- # Since error messages produced for each instance are identical, | ||
- # there will be only one error message for all instances | ||
- # (messages de-duplication). | ||
- self.assertMessageCount(res, error=1) | ||
self.assertCountEqual(instances, servers) | ||
|
||
self.assertEqual(self.mock_image_list_detailed.call_count, 4) | ||
diff --git a/openstack_dashboard/dashboards/admin/instances/views.py b/openstack_dashboard/dashboards/admin/instances/views.py | ||
index c35527fe4..efa28dd76 100644 | ||
--- a/openstack_dashboard/dashboards/admin/instances/views.py | ||
+++ b/openstack_dashboard/dashboards/admin/instances/views.py | ||
@@ -33,6 +33,8 @@ from openstack_dashboard.dashboards.admin.instances \ | ||
from openstack_dashboard.dashboards.admin.instances \ | ||
import tables as project_tables | ||
from openstack_dashboard.dashboards.admin.instances import tabs | ||
+from openstack_dashboard.dashboards.project.instances \ | ||
+ import utils as instance_utils | ||
from openstack_dashboard.dashboards.project.instances import views | ||
from openstack_dashboard.dashboards.project.instances.workflows \ | ||
import update_instance | ||
@@ -215,18 +217,9 @@ class AdminIndexView(tables.PagedTableMixin, tables.DataTableView): | ||
else: | ||
inst.image['name'] = _("-") | ||
|
||
- flavor_id = inst.flavor["id"] | ||
- try: | ||
- if flavor_id in flavor_dict: | ||
- inst.full_flavor = flavor_dict[flavor_id] | ||
- else: | ||
- # If the flavor_id is not in flavor_dict list, | ||
- # gets it via nova api. | ||
- inst.full_flavor = api.nova.flavor_get( | ||
- self.request, flavor_id) | ||
- except Exception: | ||
- msg = _('Unable to retrieve instance size information.') | ||
- exceptions.handle(self.request, msg) | ||
+ inst.full_flavor = instance_utils.resolve_flavor(self.request, | ||
+ inst, flavor_dict) | ||
+ | ||
tenant = tenant_dict.get(inst.tenant_id, None) | ||
inst.tenant_name = getattr(tenant, "name", None) | ||
return instances | ||
diff --git a/openstack_dashboard/dashboards/project/instances/tests.py b/openstack_dashboard/dashboards/project/instances/tests.py | ||
index 5ab1b4a48..fe2f58c46 100644 | ||
--- a/openstack_dashboard/dashboards/project/instances/tests.py | ||
+++ b/openstack_dashboard/dashboards/project/instances/tests.py | ||
@@ -316,6 +316,7 @@ class InstanceTableTests(InstanceTestBase, InstanceTableTestMixin): | ||
self.mock_is_feature_available.return_value = True | ||
self.mock_server_list_paged.return_value = [servers, False, False] | ||
self.mock_servers_update_addresses.return_value = None | ||
+ self.mock_flavor_get.side_effect = self.exceptions.nova | ||
self.mock_flavor_list.side_effect = self.exceptions.nova | ||
self.mock_image_list_detailed.return_value = (self.images.list(), | ||
False, False) | ||
diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py | ||
index badf540b8..b848f6fff 100644 | ||
--- a/openstack_dashboard/dashboards/project/instances/views.py | ||
+++ b/openstack_dashboard/dashboards/project/instances/views.py | ||
@@ -171,14 +171,9 @@ class IndexView(tables.PagedTableMixin, tables.DataTableView): | ||
for instance in instances: | ||
self._populate_image_info(instance, image_dict, volume_dict) | ||
|
||
- flavor_id = instance.flavor["id"] | ||
- if flavor_id in flavor_dict: | ||
- instance.full_flavor = flavor_dict[flavor_id] | ||
- else: | ||
- # If the flavor_id is not in flavor_dict, | ||
- # put info in the log file. | ||
- LOG.info('Unable to retrieve flavor "%s" for instance "%s".', | ||
- flavor_id, instance.id) | ||
+ instance.full_flavor = instance_utils.resolve_flavor(self.request, | ||
+ instance, | ||
+ flavor_dict) | ||
|
||
return instances | ||
|
||
-- | ||
2.34.1 |
39 changes: 39 additions & 0 deletions
39
...es/horizon/patches/horizon/0001-Fixing-Incorrect-URL-when-browsing-Swift-containers.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 4aa347fe196b7b18ff0bf5f4d4f076a6c14cf12e Mon Sep 17 00:00:00 2001 | ||
From: jeremy-boyle <[email protected]> | ||
Date: Sat, 24 Jun 2023 16:59:11 +0000 | ||
Subject: [PATCH] Fixing Incorrect URL when browsing Swift containers | ||
|
||
This patch fixes a bug identified in the code that generates the URL for | ||
the Swift container object. The bug caused the forward slashes (/) in the | ||
folder parameter to be encoded as %2F instead of being included as '/' in the | ||
resulting URL. | ||
|
||
To resolve this issue, the code has been updated by adding a replace() method | ||
to replace the %2F sequences with forward slashes. The updated code ensures | ||
that the URL generated for the folder parameter contains the correct forward | ||
slash (/) representation. | ||
|
||
Closes-Bug: #2009724 | ||
Signed-off-by: jeremy-boyle <[email protected]> | ||
|
||
Change-Id: I5837e74ddcc71cda6b4686e586dbb8b1386a9cd3 | ||
--- | ||
.../static/dashboard/project/containers/objects.controller.js | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js | ||
index 55262a1fa..c14128cbf 100644 | ||
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js | ||
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/objects.controller.js | ||
@@ -60,7 +60,8 @@ | ||
ctrl.containerURL = containerRoute + encodeURIComponent($routeParams.container) + | ||
ctrl.model.DELIMETER; | ||
if (angular.isDefined($routeParams.folder)) { | ||
- ctrl.currentURL = ctrl.containerURL + encodeURIComponent($routeParams.folder) + | ||
+ ctrl.currentURL = ctrl.containerURL + | ||
+ encodeURIComponent($routeParams.folder).replace(/%2F/g, '/') + | ||
ctrl.model.DELIMETER; | ||
} else { | ||
ctrl.currentURL = ctrl.containerURL; | ||
-- | ||
2.34.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...keystone/patches/keystone/0000-Ensure-application-credentials-take-account-of-impli.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 6ee7ea0d63fed272beb3806d722c2dd3585e8212 Mon Sep 17 00:00:00 2001 | ||
From: Andrew Bonney <[email protected]> | ||
Date: Tue, 5 Sep 2023 14:56:51 +0100 | ||
Subject: [PATCH] Ensure application credentials take account of implied roles | ||
|
||
Related-Bug: #2030061 | ||
Change-Id: I2aea0b89987b24cf5ddaadeecbd06c32ad81a9bc | ||
--- | ||
keystone/models/token_model.py | 13 +++++++++++-- | ||
1 file changed, 11 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/keystone/models/token_model.py b/keystone/models/token_model.py | ||
index 78146295d..b152d97c2 100644 | ||
--- a/keystone/models/token_model.py | ||
+++ b/keystone/models/token_model.py | ||
@@ -429,7 +429,13 @@ class TokenModel(object): | ||
|
||
def _get_application_credential_roles(self): | ||
roles = [] | ||
+ roles_added = list() | ||
app_cred_roles = self.application_credential['roles'] | ||
+ app_cred_roles = [{'role_id': r['id']} for r in app_cred_roles] | ||
+ effective_app_cred_roles = ( | ||
+ PROVIDERS.assignment_api.add_implied_roles(app_cred_roles) | ||
+ ) | ||
+ | ||
assignment_list = PROVIDERS.assignment_api.list_role_assignments( | ||
user_id=self.user_id, | ||
project_id=self.project_id, | ||
@@ -437,9 +443,12 @@ class TokenModel(object): | ||
effective=True) | ||
user_roles = list(set([x['role_id'] for x in assignment_list])) | ||
|
||
- for role in app_cred_roles: | ||
- if role['id'] in user_roles: | ||
+ for role in effective_app_cred_roles: | ||
+ if role['role_id'] in user_roles and \ | ||
+ role['role_id'] not in roles_added: | ||
+ role = PROVIDERS.role_api.get_role(role['role_id']) | ||
roles.append({'id': role['id'], 'name': role['name']}) | ||
+ roles_added.append(role['id']) | ||
|
||
return roles | ||
|
||
-- | ||
2.34.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.