Update the access_and_security url

Since this bp reorganise-access-and-security,
move access_and_security to separate panel,
there are some places url need to change too.

Closes-Bug: #1679895

Change-Id: I59560c479ad77d2452484b2138065a003451f376
This commit is contained in:
zhurong 2017-04-01 17:12:04 +08:00
parent 8d5eafc957
commit b1a9078404
7 changed files with 17 additions and 11 deletions

View File

@ -533,7 +533,7 @@ class SetInstanceDetails(workflows.Step):
return context
KEYPAIR_IMPORT_URL = "horizon:project:access_and_security:keypairs:import"
KEYPAIR_IMPORT_URL = "horizon:project:key_pairs:keypairs:import"
class SetAccessControlsAction(workflows.Action):

View File

@ -3,6 +3,6 @@
{% block title %}{{ page_title }}{% endblock %}
{% block main %}
{% include 'project/access_and_security/keypairs/_create.html' %}
{% include 'project/key_pairs/_create.html' %}
{% endblock %}

View File

@ -3,5 +3,5 @@
{% block title %}{{ page_title }}{% endblock %}
{% block main %}
{% include 'project/access_and_security/keypairs/_import.html' %}
{% include 'project/key_pairs/_import.html' %}
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% block main %}
{% include 'project/access_and_security/security_groups/_create.html' %}
{% include 'project/security_groups/_create.html' %}
{% endblock %}

View File

@ -85,7 +85,7 @@ class UpdateView(forms.ModalFormView):
return api.network.security_group_get(self.request, sg_id)
except Exception:
msg = _('Unable to retrieve security group.')
url = reverse('horizon:project:access_and_security:index')
url = reverse('horizon:project:security_groups:index')
exceptions.handle(self.request, msg, redirect=url)
def get_context_data(self, **kwargs):

View File

@ -40,7 +40,7 @@ resource_urls = {
"AWS::EC2::RouteTable": {
'link': 'horizon:project:routers:detail'},
"AWS::EC2::SecurityGroup": {
'link': 'horizon:project:access_and_security:index'},
'link': 'horizon:project:security_groups:index'},
"AWS::EC2::Subnet": {
'link': 'horizon:project:networks:subnets:detail'},
"AWS::EC2::Volume": {
@ -100,7 +100,7 @@ resource_urls = {
"OS::Neutron::VPNService": {
'link': 'horizon:project:vpn:vpnservicedetails'},
"OS::Nova::KeyPair": {
'link': 'horizon:project:access_and_security:index'},
'link': 'horizon:project:key_pairs:index'},
"OS::Nova::Server": {
'link': 'horizon:project:instances:detail'},
"OS::Swift::Container": {

View File

@ -17,8 +17,10 @@ from openstack_dashboard.test.integration_tests.regions import baseregion
class NavigationAccordionRegion(baseregion.BaseRegion):
"""Navigation menu located in the left."""
_project_access_security_locator = (
by.By.CSS_SELECTOR, 'a[href*="/project/access_and_security/"]')
_project_security_groups_locator = (
by.By.CSS_SELECTOR, 'a[href*="/project/security_groups/"]')
_project_key_pairs_locator = (
by.By.CSS_SELECTOR, 'a[href*="/project/key_pairs/"]')
_settings_change_password_locator = (
by.By.CSS_SELECTOR, 'a[href*="/settings/password//"]')
_project_bar_locator = (by.By.XPATH,
@ -74,8 +76,12 @@ class NavigationAccordionRegion(baseregion.BaseRegion):
return None
@property
def access_security(self):
return self._get_element(*self._project_access_security_locator)
def security_groups(self):
return self._get_element(*self._project_security_groups_locator)
@property
def key_pairs(self):
return self._get_element(*self._project_key_pairs_locator)
@property
def change_password(self):