Modifying horizon workflow

asked 2015-09-18 10:34:28 -0500

mpearrow gravatar image

Hi all,

I'm new to Django and Horizon/OpenStack. I am running Ubuntu 14.04.03 LTS, with the stock Ubuntu 2:8.0.0~b2-0ubuntu4~cloud0 openstack-dashboard package and the 2:8.0.0~b2-0ubuntu4~cloud0 python-django-horizon package.

I am looking to add a field to the Launch Instancemodal, and having read the documentation at http://docs.openstack.org/developer/horizon/topics/tutorial.html (http://docs.openstack.org/developer/h...) , I'm not exactly sure of the "right" approach to take. I'm hoping for some guidance.

There's one question here that looks pretty close:

https://ask.openstack.org/en/question/2589/modify-dashboard/ (https://ask.openstack.org/en/question...)

It sounds like I need to override the entire workflow that is in create_instance.py. However, I'm unclear on how to do that: do I just create an overrides file that is in my python path, add it in my config, e.g.:

HORIZON_CONFIG = {
    "customization_module": "horizon_mods.override"
}

I've tried this approach, but the override isn't working; the new field I create does not show up on the modal. E.g.,

class SetInstanceDetailsAction(workflows.Action):   
     fixed_ip = forms.CharField(
     widget=forms.TextInput, label=_("eth0 Fixed IP"), max_length=15,
     required=False, help_text=_("Your Fixed IP Address"))
edit retag flag offensive close merge delete