Andrew Bogott has submitted this change and it was merged.
Change subject: Monkeypatch Horizon to simplify the instance-creation panel.
..
Monkeypatch Horizon to simplify the instance-creation panel.
This uses a built in Horizon facility, 'customization_module'.
Change-Id: I12ca1bbf25546f89465aba4425d2dd2847f9dd1a
---
A modules/openstack/files/liberty/horizon/.pep8
A modules/openstack/files/liberty/horizon/overrides.py
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/templates/liberty/horizon/local_settings.py.erb
4 files changed, 24 insertions(+), 0 deletions(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/openstack/files/liberty/horizon/.pep8
b/modules/openstack/files/liberty/horizon/.pep8
new file mode 100644
index 000..1829933
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/.pep8
@@ -0,0 +1,3 @@
+[pep8]
+# This is a third-party file, so I'm just turning off everything...
+ignore = E501
diff --git a/modules/openstack/files/liberty/horizon/overrides.py
b/modules/openstack/files/liberty/horizon/overrides.py
new file mode 100644
index 000..251f607
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/overrides.py
@@ -0,0 +1,11 @@
+# -- Tidy up the instance creation panel --
+
+from openstack_dashboard.dashboards.project.instances.workflows import
create_instance
+# Remove a couple of unwanted tabs from the instance creation panel:
+# PostCreationStep just provides confusing competition with puppet.
+# SetAdvanced provides broken features like configdrive and partitioning.
+
+create_instance.LaunchInstance.default_steps =
(create_instance.SelectProjectUser,
+
create_instance.SetInstanceDetails,
+
create_instance.SetAccessControls,
+create_instance.SetNetwork)
diff --git a/modules/openstack/manifests/horizon/service.pp
b/modules/openstack/manifests/horizon/service.pp
index bd1ddd2..be215da 100644
--- a/modules/openstack/manifests/horizon/service.pp
+++ b/modules/openstack/manifests/horizon/service.pp
@@ -136,6 +136,15 @@
mode=> '0644',
}
+# Monkeypatches for Horizon customization
+file { '/usr/lib/python2.7/dist-packages/horizon/overrides.py':
+source =>
"puppet:///modules/openstack/${openstack_version}/horizon/overrides.py",
+owner => 'root',
+group => 'root',
+require => Package['python-openstack-auth'],
+mode=> '0644',
+}
+
apache::site { $webserver_hostname:
content =>
template("openstack/${$openstack_version}/horizon/${webserver_hostname}.erb"),
require => File['/etc/openstack-dashboard/local_settings.py'],
diff --git a/modules/openstack/templates/liberty/horizon/local_settings.py.erb
b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
index cc9cb7e..c5b0f5f 100644
--- a/modules/openstack/templates/liberty/horizon/local_settings.py.erb
+++ b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
@@ -74,6 +74,7 @@
'exceptions': {'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED},
+'customization_module': 'horizon.overrides',
}
# Specify a regular expression to validate user passwords.
--
To view, visit https://gerrit.wikimedia.org/r/275156
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I12ca1bbf25546f89465aba4425d2dd2847f9dd1a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott
Gerrit-Reviewer: Andrew Bogott
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits