~james-page/charms/trusty/openstack-dashboard/kilo-fixup

« back to all changes in this revision

Viewing changes to hooks/horizon_contexts.py

  • Committer: james.page at ubuntu
  • Date: 2014-10-06 14:47:17 UTC
  • mfrom: (25.2.14 openstack-dashboard)
  • Revision ID: james.page@ubuntu.com-20141006144717-kbqvo3l2fnu9skqd
[shiva,r=james-page] Add profile configuration setting to support cisco.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
            "webroot": config('webroot'),
85
85
            "ubuntu_theme": config('ubuntu-theme') in ['yes', True],
86
86
            "secret": config('secret') or pwgen(),
 
87
            'support_profile': config('profile')
 
88
            if config('profile') in ['cisco'] else None,
87
89
            "neutron_network_lb": config("neutron-network-lb"),
88
90
            "neutron_network_firewall": config("neutron-network-firewall"),
89
91
            "neutron_network_vpn": config("neutron-network-vpn"),
123
125
                'ssl_configured': False,
124
126
            }
125
127
        return ctxt
 
128
 
 
129
 
 
130
class RouterSettingContext(OSContextGenerator):
 
131
    def __call__(self):
 
132
        ''' Enable/Disable Router Tab on horizon '''
 
133
        ctxt = {
 
134
            'disable_router': False if config('profile') in ['cisco'] else True
 
135
        }
 
136
        return ctxt