author | Drew Fisher <drew.fisher@oracle.com> |
Wed, 11 Jun 2014 17:13:12 -0700 | |
changeset 1944 | 56ac2df1785b |
parent 1820 | f3a6bd7bd4a6 |
child 1970 | f37782924749 |
permissions | -rw-r--r-- |
1820
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
1 |
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
2 |
# |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
3 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
4 |
# not use this file except in compliance with the License. You may obtain |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
5 |
# a copy of the License at |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
6 |
# |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
8 |
# |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
9 |
# Unless required by applicable law or agreed to in writing, software |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
10 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
11 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
12 |
# License for the specific language governing permissions and limitations |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
13 |
# under the License. |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
14 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
15 |
""" |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
16 |
Solaris-specific customizations for Horizon |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
17 |
""" |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
18 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
19 |
from openstack_dashboard.dashboards.admin.networks.forms import CreateNetwork |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
20 |
from openstack_dashboard.dashboards.admin.networks.ports.forms import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
21 |
CreatePort |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
22 |
from openstack_dashboard.dashboards.admin.networks.ports.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
23 |
DeletePort, PortsTable |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
24 |
from openstack_dashboard.dashboards.admin.networks.subnets.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
25 |
DeleteSubnet, SubnetsTable |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
26 |
from openstack_dashboard.dashboards.admin.networks.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
27 |
DeleteNetwork, NetworksTable |
1944
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
1820
diff
changeset
|
28 |
from openstack_dashboard.dashboards.project.access_and_security.tabs import \ |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
1820
diff
changeset
|
29 |
AccessAndSecurityTabs, APIAccessTab, FloatingIPsTab, KeypairsTab |
1820
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
30 |
from openstack_dashboard.dashboards.project.instances.tabs import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
31 |
InstanceDetailTabs, LogTab, OverviewTab |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
32 |
from openstack_dashboard.dashboards.project.instances.workflows import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
33 |
create_instance |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
34 |
from openstack_dashboard.dashboards.project.networks.ports.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
35 |
PortsTable as projectPortsTable |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
36 |
from openstack_dashboard.dashboards.project.networks.subnets.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
37 |
DeleteSubnet as projectDeleteSubnet |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
38 |
from openstack_dashboard.dashboards.project.networks.subnets.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
39 |
SubnetsTable as projectSubnetsTable |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
40 |
from openstack_dashboard.dashboards.project.networks.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
41 |
CreateSubnet as projectCreateSubnet |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
42 |
from openstack_dashboard.dashboards.project.networks.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
43 |
DeleteNetwork as projectDeleteNetwork |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
44 |
from openstack_dashboard.dashboards.project.networks.tables import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
45 |
NetworksTable as projectNetworksTable |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
46 |
from openstack_dashboard.dashboards.project.networks.workflows import \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
47 |
CreateNetworkInfoAction, CreateSubnetDetailAction, CreateSubnetInfoAction |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
48 |
|
1944
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
1820
diff
changeset
|
49 |
# remove VolumeOptions and PostCreationStep from LaunchInstance |
1820
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
50 |
create_instance.LaunchInstance.default_steps = \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
51 |
(create_instance.SelectProjectUser, |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
52 |
create_instance.SetInstanceDetails, |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
53 |
create_instance.SetAccessControls, |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
54 |
create_instance.SetNetwork) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
55 |
|
1944
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
1820
diff
changeset
|
56 |
# Remove the Security Groups tab from Project/Access and Security |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
1820
diff
changeset
|
57 |
AccessAndSecurityTabs.tabs = (KeypairsTab, FloatingIPsTab, APIAccessTab) |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
1820
diff
changeset
|
58 |
|
1820
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
59 |
# remove the 'Console' tab from Instance Detail |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
60 |
InstanceDetailTabs.tabs = (OverviewTab, LogTab) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
61 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
62 |
# Disable 'admin_state' and 'shared' checkboxes on Create Networks |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
63 |
CreateNetwork.base_fields['admin_state'].widget.attrs['disabled'] = True |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
64 |
CreateNetwork.base_fields['shared'].widget.attrs['disabled'] = True |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
65 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
66 |
# Disable 'admin_state' checkbox on Create Port |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
67 |
CreatePort.base_fields['admin_state'].widget.attrs['disabled'] = True |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
68 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
69 |
# Remove the ability to Update Ports |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
70 |
PortsTable._meta.row_actions = (DeletePort,) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
71 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
72 |
# Remove the ability to Update Subnets |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
73 |
SubnetsTable._meta.row_actions = (DeleteSubnet,) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
74 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
75 |
# Remove the ability to Edit Networks |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
76 |
NetworksTable._meta.row_actions = (DeleteNetwork,) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
77 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
78 |
# Remove the ability to Update project Ports |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
79 |
projectPortsTable._meta.row_actions = () |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
80 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
81 |
# Remove the ability to Update project Subnets |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
82 |
projectSubnetsTable._meta.row_actions = (projectDeleteSubnet,) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
83 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
84 |
# Remove the ability to Edit project Networks |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
85 |
projectNetworksTable._meta.row_actions = (projectCreateSubnet, |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
86 |
projectDeleteNetwork) |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
87 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
88 |
# Disable 'admin_state' checkbox on Create project Networks |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
89 |
CreateNetworkInfoAction.base_fields['admin_state'].widget.attrs['disabled'] = \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
90 |
True |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
91 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
92 |
# Disable 'no_gateway' checkbox on Create project Networks |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
93 |
CreateSubnetInfoAction.base_fields['no_gateway'].widget.attrs['disabled'] = \ |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
94 |
True |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
95 |
|
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
96 |
# change 'allocation_pools' and 'host_routes' to readonly |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
97 |
base_fields = CreateSubnetDetailAction.base_fields |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
98 |
base_fields['allocation_pools'].widget.attrs['readonly'] = 'readonly' |
f3a6bd7bd4a6
18545343 nova-conductor's method shouldn't try to enable mysql
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
99 |
base_fields['host_routes'].widget.attrs['readonly'] = 'readonly' |