Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/275156
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/overrides.py M modules/openstack/manifests/horizon/service.pp M modules/openstack/templates/liberty/horizon/local_settings.py.erb 3 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/275156/1 diff --git a/modules/openstack/files/liberty/horizon/overrides.py b/modules/openstack/files/liberty/horizon/overrides.py new file mode 100644 index 0000000..5203ba0 --- /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: newchange Gerrit-Change-Id: I12ca1bbf25546f89465aba4425d2dd2847f9dd1a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits