Skip to content
Snippets Groups Projects
Commit 80cb3065 authored by JORGE SASIAIN's avatar JORGE SASIAIN
Browse files

Make members field in each side of the trunk be a drop down list

parent 3d14476a
Branches
Tags
1 merge request!2Develop patch
......@@ -2,3 +2,4 @@ __pycache__/
*.egg-info
.coverage
coverage.xml
.tox/
......@@ -65,7 +65,6 @@ Is process the same as subscription? If not, what’s the endpoint/way to create
## TODO
- Fix flake8 errors for main.py products and workflows imports
- The current input form for the members list in create_trunk_config_side is not apprpriate for a list
- Integrate provision step (in CreateTrunkConfigSide) with IPAM/Infoblox
## Resources
......
......@@ -43,6 +43,25 @@ def trunk_config_selector() -> list:
)
def member_selector() -> list:
interfaces_dict = {
"ge-0/0/1": "ge-0/0/1",
"ge-0/0/2": "ge-0/0/2",
"ge-0/0/3": "ge-0/0/3",
"ge-0/0/4": "ge-0/0/4",
"ge-0/0/5": "ge-0/0/5"
}
return choice_list(
Choice("Member Interfaces", zip(
interfaces_dict.keys(),
interfaces_dict.items())), # type:ignore
min_items=1,
max_items=4,
unique_items=True,
)
def initial_input_form_generator(product_name: str) -> FormGenerator:
class CreateTrunkConfigSideForm(FormPage):
class Config:
......@@ -53,7 +72,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
geant_a_sid: str
ipv4_address: Optional[str]
ipv6_address: Optional[str]
members: List[str]
members: member_selector() # type:ignore
trunk_config_ids: trunk_config_selector() # type:ignore
user_input = yield CreateTrunkConfigSideForm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment