summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.zuul.yaml2
-rw-r--r--horizon/base.py6
-rw-r--r--horizon/locale/pt_BR/LC_MESSAGES/django.po14
-rw-r--r--horizon/locale/pt_BR/LC_MESSAGES/djangojs.po8
-rw-r--r--lower-constraints.txt2
-rw-r--r--openstack_dashboard/api/cinder.py78
-rw-r--r--openstack_dashboard/locale/pt_BR/LC_MESSAGES/djangojs.po34
-rw-r--r--openstack_dashboard/themes/material/static/horizon/_styles.scss9
-rw-r--r--releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml9
-rw-r--r--reno.yaml3
-rw-r--r--requirements.txt2
-rw-r--r--test-requirements.txt3
13 files changed, 110 insertions, 63 deletions
diff --git a/.gitignore b/.gitignore
index ac94b58c8..bf82d8277 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,8 +16,11 @@ coverage-karma
pep8.txt
pylint.txt
# Files created by releasenotes build
+RELEASENOTES.rst
releasenotes/build
+releasenotes/notes/reno.cache
reports
+
openstack_dashboard/local/*
!openstack_dashboard/local/local_settings.py.example
!openstack_dashboard/local/enabled/_50__settings.py.example
diff --git a/.zuul.yaml b/.zuul.yaml
index 19f9a3934..db422b6a1 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -103,7 +103,7 @@
tox_envlist: bandit-baseline
irrelevant-files:
- ^.*\.rst$
- - ^.*\locale/.*$
+ - ^.*/locale/.*$
- ^doc/.*$
- ^releasenotes/.*$
- ^setup.cfg$
diff --git a/horizon/base.py b/horizon/base.py
index 50efee407..2cdace254 100644
--- a/horizon/base.py
+++ b/horizon/base.py
@@ -573,13 +573,13 @@ class Dashboard(Registry, HorizonComponent):
urlpatterns.append(
url(r'', _wrapped_include(default_panel._decorated_urls)))
- # Require login if not public.
- if not self.public:
- _decorate_urlconf(urlpatterns, require_auth)
# Apply access controls to all views in the patterns
permissions = getattr(self, 'permissions', [])
_decorate_urlconf(urlpatterns, require_perms, permissions)
_decorate_urlconf(urlpatterns, _current_component, dashboard=self)
+ # Require login if not public.
+ if not self.public:
+ _decorate_urlconf(urlpatterns, require_auth)
# Return the three arguments to django.conf.urls.include
return urlpatterns, self.slug, self.slug
diff --git a/horizon/locale/pt_BR/LC_MESSAGES/django.po b/horizon/locale/pt_BR/LC_MESSAGES/django.po
index 65169318a..65d3f0022 100644
--- a/horizon/locale/pt_BR/LC_MESSAGES/django.po
+++ b/horizon/locale/pt_BR/LC_MESSAGES/django.po
@@ -5,15 +5,16 @@
# Marcio <marciofoz@gmail.com>, 2017. #zanata
# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2018. #zanata
# Marcelo Dieder <marcelodieder@gmail.com>, 2018. #zanata
+# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2020. #zanata
msgid ""
msgstr ""
"Project-Id-Version: horizon VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
-"POT-Creation-Date: 2018-04-30 08:52+0000\n"
+"POT-Creation-Date: 2020-04-25 12:06+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2018-04-25 11:32+0000\n"
+"PO-Revision-Date: 2020-04-24 02:23+0000\n"
"Last-Translator: Fernando Pimenta <fernando.c.pimenta@gmail.com>\n"
"Language-Team: Portuguese (Brazil)\n"
"Language: pt_BR\n"
@@ -138,6 +139,15 @@ msgstr[1] "Itens em Lote"
msgid "Cancel"
msgstr "Cancelar"
+msgid "Change"
+msgstr "Alterar"
+
+msgid "Change Password"
+msgstr "Alterar senha"
+
+msgid "Change password"
+msgstr "Alterar senha"
+
#, python-format
msgid "Displaying %(content_items)s item"
msgid_plural "Displaying %(content_items)s items"
diff --git a/horizon/locale/pt_BR/LC_MESSAGES/djangojs.po b/horizon/locale/pt_BR/LC_MESSAGES/djangojs.po
index f62d7ffd4..7647370ab 100644
--- a/horizon/locale/pt_BR/LC_MESSAGES/djangojs.po
+++ b/horizon/locale/pt_BR/LC_MESSAGES/djangojs.po
@@ -7,15 +7,16 @@
# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2017. #zanata
# Marcio <marciofoz@gmail.com>, 2017. #zanata
# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2018. #zanata
+# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2020. #zanata
msgid ""
msgstr ""
"Project-Id-Version: horizon VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
-"POT-Creation-Date: 2019-09-03 20:32+0000\n"
+"POT-Creation-Date: 2020-04-25 12:06+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2018-10-03 07:53+0000\n"
+"PO-Revision-Date: 2020-04-24 02:24+0000\n"
"Last-Translator: Fernando Pimenta <fernando.c.pimenta@gmail.com>\n"
"Language-Team: Portuguese (Brazil)\n"
"Language: pt_BR\n"
@@ -225,6 +226,9 @@ msgstr "Encerrar"
msgid "Flavor"
msgstr "Flavor"
+msgid "Forbidden. Insufficient permissions of the requested operation"
+msgstr "Proibido. Permissões insuficientes da operação solicitada"
+
msgid "Format validation failed"
msgstr "Validação de formato falhou"
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 1cc785950..4f9460fa6 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -92,7 +92,7 @@ pymongo==3.0.2
pyOpenSSL==17.1.0
pyparsing==2.1.0
pyperclip==1.5.27
-pyScss==1.3.4
+pyScss==1.3.7
python-cinderclient==4.0.1
python-dateutil==2.5.3
python-glanceclient==2.8.0
diff --git a/openstack_dashboard/api/cinder.py b/openstack_dashboard/api/cinder.py
index 9d3154fa6..6028efcf4 100644
--- a/openstack_dashboard/api/cinder.py
+++ b/openstack_dashboard/api/cinder.py
@@ -201,78 +201,56 @@ class GroupType(base.APIResourceWrapper):
_attrs = ['id', 'name', 'description', 'is_public', 'group_specs']
-def get_auth_params_from_request(request):
- auth_url = base.url_for(request, 'identity')
- cinder_urls = []
- for service_name in ('volumev3', 'volumev2', 'volume'):
+def _find_cinder_url(request, version=None):
+ if version is None:
+ api_version = VERSIONS.get_active_version()
+ version = api_version['version']
+ version = base.Version(version)
+
+ # We support only cinder v2 and v3.
+ if version.major == 3:
+ candidates = ['volumev3', 'volume']
+ else:
+ candidates = ['volumev2', 'volume']
+
+ for service_name in candidates:
try:
- cinder_url = base.url_for(request, service_name)
- cinder_urls.append((service_name, cinder_url))
+ return version, base.url_for(request, service_name)
except exceptions.ServiceCatalogException:
pass
- if not cinder_urls:
+ else:
raise exceptions.ServiceCatalogException(
- "no volume service configured")
- cinder_urls = tuple(cinder_urls) # need to make it cacheable
- return(
- request.user.username,
- request.user.token.id,
- request.user.tenant_id,
- cinder_urls,
- auth_url,
- )
+ ("Cinder %(version)s requested but no '%(service)s' service "
+ "type available in Keystone catalog.") %
+ {'version': version, 'service': candidates})
@memoized
def cinderclient(request, version=None):
- if version is None:
- api_version = VERSIONS.get_active_version()
- version = api_version['version']
+ version, cinder_url = _find_cinder_url(request, version)
+
insecure = settings.OPENSTACK_SSL_NO_VERIFY
cacert = settings.OPENSTACK_SSL_CACERT
- (username, token_id, tenant_id, cinder_urls,
- auth_url) = get_auth_params_from_request(request)
- version = base.Version(version)
- if version.major == 2:
- service_names = ('volumev2', 'volume')
- elif version.major == 3:
- service_names = ('volumev3', 'volume')
- else:
- service_names = ('volume',)
- for name, _url in cinder_urls:
- if name in service_names:
- cinder_url = _url
- break
- else:
- raise exceptions.ServiceCatalogException(
- "Cinder {version} requested but no '{service}' service "
- "type available in Keystone catalog.".format(version=version,
- service=service_names)
- )
c = cinder_client.Client(
version,
- username,
- token_id,
- project_id=tenant_id,
- auth_url=auth_url,
+ request.user.username,
+ request.user.token.id,
+ project_id=request.user.tenant_id,
+ auth_url=base.url_for(request, 'identity'),
insecure=insecure,
cacert=cacert,
http_log_debug=settings.DEBUG,
)
- c.client.auth_token = token_id
+ c.client.auth_token = request.user.token.id
c.client.management_url = cinder_url
return c
def get_microversion(request, features):
- for service_name in ('volume', 'volumev2', 'volumev3'):
- try:
- cinder_url = base.url_for(request, service_name)
- break
- except exceptions.ServiceCatalogException:
- continue
- else:
+ try:
+ version, cinder_url = _find_cinder_url(request)
+ except exceptions.ServiceCatalogException:
return None
min_ver, max_ver = cinder_client.get_server_version(cinder_url)
return microversions.get_microversion_for_features(
diff --git a/openstack_dashboard/locale/pt_BR/LC_MESSAGES/djangojs.po b/openstack_dashboard/locale/pt_BR/LC_MESSAGES/djangojs.po
index ee4100e39..83473daf8 100644
--- a/openstack_dashboard/locale/pt_BR/LC_MESSAGES/djangojs.po
+++ b/openstack_dashboard/locale/pt_BR/LC_MESSAGES/djangojs.po
@@ -12,15 +12,16 @@
# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2018. #zanata
# Marcelo Dieder <marcelodieder@gmail.com>, 2018. #zanata
# Rodrigo Loures <rmoraesloures@gmail.com>, 2018. #zanata
+# Fernando Pimenta <fernando.c.pimenta@gmail.com>, 2020. #zanata
msgid ""
msgstr ""
"Project-Id-Version: horizon VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
-"POT-Creation-Date: 2019-05-29 17:58+0000\n"
+"POT-Creation-Date: 2020-04-25 12:06+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2018-08-08 11:48+0000\n"
+"PO-Revision-Date: 2020-04-24 02:32+0000\n"
"Last-Translator: Fernando Pimenta <fernando.c.pimenta@gmail.com>\n"
"Language-Team: Portuguese (Brazil)\n"
"Language: pt_BR\n"
@@ -534,6 +535,11 @@ msgstr "Configuração de Drive"
msgid "Confirm Delete"
msgstr "Confirma Exclusão"
+msgid "Confirm Delete Domain"
+msgid_plural "Confirm Delete Domains"
+msgstr[0] "Confirmar Exclusão de Domínio"
+msgstr[1] "Confirmar Exclusão de Domínios"
+
msgid "Confirm Delete Flavor"
msgid_plural "Confirm Delete Flavors"
msgstr[0] "Confirmar a Exclusão do Flavor"
@@ -809,6 +815,14 @@ msgstr "Remover"
msgid "Delete Container"
msgstr "Remover Contêiner"
+msgid "Delete Domain"
+msgid_plural "Delete Domains"
+msgstr[0] "Excluir Domínio"
+msgstr[1] "Excluir Domínios"
+
+msgid "Delete Domains"
+msgstr "Excluir Domínios"
+
msgid "Delete Files in {$ ctrl.model.container.name $}"
msgstr "Excluir Arquivos em {$ ctrl.model.container.name $}"
@@ -954,6 +968,12 @@ msgstr[0] "Usuário Excluído: %s."
msgstr[1] "Usuários Excluídos:%s."
#, python-format
+msgid "Deleted domain: %s."
+msgid_plural "Deleted domains: %s."
+msgstr[0] "Domínio excluído: %s."
+msgstr[1] "Domínios excluídos: %s."
+
+#, python-format
msgid "Deleted policy: %s."
msgid_plural "Deleted policies: %s."
msgstr[0] "Política excluída: %s."
@@ -3788,6 +3808,10 @@ msgid "Yes"
msgstr "Sim"
#, python-format
+msgid "You are not allowed to delete domains: %s"
+msgstr "Você não tem permissão para excluir domínios: %s"
+
+#, python-format
msgid "You are not allowed to delete images: %s"
msgstr "Você não tem permissão para excluir imagens: %s"
@@ -3861,6 +3885,12 @@ msgstr[0] "Você selecionou \"%s\". Trunk Excluído não é recuperável."
msgstr[1] "Você selecionou \"%s\". Trunks Excluídos não são recuperáveis."
#, python-format
+msgid "You have selected \"%s\". Deleted domain is not recoverable."
+msgid_plural "You have selected \"%s\". Deleted domains are not recoverable."
+msgstr[0] "Você selecionou \"%s\". Domínio excluído não é recuperável."
+msgstr[1] "Você selecionou \"%s\". Domínios excluídos não são recuperáveis."
+
+#, python-format
msgid "You have selected \"%s\". Deleted flavor is not recoverable."
msgid_plural "You have selected \"%s\". Deleted flavors are not recoverable."
msgstr[0] "Você selecionou \"%s\". Um flavor excluído não é recuperável."
diff --git a/openstack_dashboard/themes/material/static/horizon/_styles.scss b/openstack_dashboard/themes/material/static/horizon/_styles.scss
index 047af9943..8b0775727 100644
--- a/openstack_dashboard/themes/material/static/horizon/_styles.scss
+++ b/openstack_dashboard/themes/material/static/horizon/_styles.scss
@@ -1,3 +1,12 @@
+// NOTE(e0ne): it's temporary workaround to until specified function will
+// be supported by pyScss. We need to define this function before any MDI
+// usage.
+@if not function-exists("selector-append") {
+ @function selector-append($selector, $to-append) {
+ @return append-selector($selector, $to-append);
+ }
+}
+
@import "animations";
@import "icons";
@import "components/checkboxes";
diff --git a/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml b/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml
new file mode 100644
index 000000000..ed0b35118
--- /dev/null
+++ b/releasenotes/notes/pyscss-and-setuptools-7634dcee9d62bde9.yaml
@@ -0,0 +1,9 @@
+---
+upgrade:
+ - |
+ pyScss 1.3.7 is now required due to the incompatibility that
+ pyScss 1.3.4 used before in horizon does not work with setuptools 46.
+ - |
+ Along with the upgrade of pyScss to 1.3.7, a workaround for the
+ material design theme is added to make it work properly.
+ See [:bug:`1771559`] for detail.
diff --git a/reno.yaml b/reno.yaml
new file mode 100644
index 000000000..60b0c183d
--- /dev/null
+++ b/reno.yaml
@@ -0,0 +1,3 @@
+---
+# Ignore the kilo-eol tag because that branch does not work with reno.
+closed_branch_tag_re: "(.+)(?<!kilo)-eol"
diff --git a/requirements.txt b/requirements.txt
index 0a8f8be5a..5b2c10550 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -30,7 +30,7 @@ oslo.utils>=3.33.0 # Apache-2.0
osprofiler>=2.3.0 # Apache-2.0
Pint>=0.5 # BSD
pymongo!=3.1,>=3.0.2 # Apache-2.0
-pyScss!=1.3.5,>=1.3.4 # MIT License
+pyScss>=1.3.7 # MIT License
python-cinderclient>=4.0.1 # Apache-2.0
python-glanceclient>=2.8.0 # Apache-2.0
python-keystoneclient>=3.15.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 53bcea9b9..ab6d9949b 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -17,7 +17,8 @@ flake8-import-order==0.12 # LGPLv3
mock>=2.0.0 # BSD
mox3>=0.20.0 # Apache-2.0
nodeenv>=0.9.4 # BSD
-python-memcached>=1.59 # PSF
+python-memcached>=1.59;python_version=='2.7' # PSF
+python-memcached>=1.59;python_version>='3.4' # PSF
pylint==2.2.2;python_version>='3.0' # GPLv2
selenium>=2.50.1 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD