On branch main
Initial commit Changes to be committed: new file: README.md new file: abx/apply_nsx_tags_for_tiers/README.md new file: abx/apply_nsx_tags_for_tiers/action.py new file: abx/list_vcenter_vms/README.md new file: abx/list_vcenter_vms/action.py new file: abx/send_email/README.md new file: abx/send_email/action.py new file: blueprints/forms/vdefend-form.json new file: blueprints/vdefend-form-driven.yaml
This commit is contained in:
149
blueprints/forms/vdefend-form.json
Normal file
149
blueprints/forms/vdefend-form.json
Normal file
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"schemaVersion": "1",
|
||||
"layout": {
|
||||
"pages": [
|
||||
{
|
||||
"id": "page1",
|
||||
"title": "vDefend Policy Builder",
|
||||
"sections": [
|
||||
{
|
||||
"id": "sec-app",
|
||||
"label": "Application",
|
||||
"fields": [
|
||||
"app_name",
|
||||
"env_value",
|
||||
"requester_email"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sec-vms",
|
||||
"label": "Select VMs",
|
||||
"fields": [
|
||||
"vm_web",
|
||||
"vm_app",
|
||||
"vm_db"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sec-ports",
|
||||
"label": "Ports",
|
||||
"fields": [
|
||||
"ports_web_to_app_csv",
|
||||
"ports_app_to_db_csv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sec-endpoints",
|
||||
"label": "Endpoints",
|
||||
"fields": [
|
||||
"nsx_manager_url",
|
||||
"nsx_username",
|
||||
"nsx_password"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fields": {
|
||||
"app_name": {
|
||||
"type": "string",
|
||||
"label": "Application Name"
|
||||
},
|
||||
"env_value": {
|
||||
"type": "string",
|
||||
"label": "Environment",
|
||||
"enum": [
|
||||
"prod",
|
||||
"test",
|
||||
"dev"
|
||||
]
|
||||
},
|
||||
"requester_email": {
|
||||
"type": "string",
|
||||
"label": "Requester Email"
|
||||
},
|
||||
"ports_web_to_app": {
|
||||
"type": "array",
|
||||
"label": "Ports (Web->App)",
|
||||
"hidden": true
|
||||
},
|
||||
"ports_app_to_db": {
|
||||
"type": "array",
|
||||
"label": "Ports (App->DB)",
|
||||
"hidden": true
|
||||
},
|
||||
"ports_web_to_app_csv": {
|
||||
"type": "string",
|
||||
"label": "Ports (Web->App) CSV",
|
||||
"default": "80,443",
|
||||
"computeScript": "return form.getValue('ports_web_to_app_csv').split(',').map(s=>Number(s.trim())).filter(n=>!isNaN(n));",
|
||||
"onChangeScript": "form.setValue('ports_web_to_app', eval(field.computeScript));"
|
||||
},
|
||||
"ports_app_to_db_csv": {
|
||||
"type": "string",
|
||||
"label": "Ports (App->DB) CSV",
|
||||
"default": "5432",
|
||||
"computeScript": "return form.getValue('ports_app_to_db_csv').split(',').map(s=>Number(s.trim())).filter(n=>!isNaN(n));",
|
||||
"onChangeScript": "form.setValue('ports_app_to_db', eval(field.computeScript));"
|
||||
},
|
||||
"vm_web": {
|
||||
"type": "array",
|
||||
"label": "Web Tier VMs",
|
||||
"dataSource": {
|
||||
"type": "action",
|
||||
"actionId": "list_vcenter_vms",
|
||||
"parameters": {}
|
||||
},
|
||||
"multiSelect": true
|
||||
},
|
||||
"vm_app": {
|
||||
"type": "array",
|
||||
"label": "App Tier VMs",
|
||||
"dataSource": {
|
||||
"type": "action",
|
||||
"actionId": "list_vcenter_vms",
|
||||
"parameters": {}
|
||||
},
|
||||
"multiSelect": true
|
||||
},
|
||||
"vm_db": {
|
||||
"type": "array",
|
||||
"label": "DB Tier VMs",
|
||||
"dataSource": {
|
||||
"type": "action",
|
||||
"actionId": "list_vcenter_vms",
|
||||
"parameters": {}
|
||||
},
|
||||
"multiSelect": true
|
||||
},
|
||||
"nsx_manager_url": {
|
||||
"type": "string",
|
||||
"label": "NSX Manager URL"
|
||||
},
|
||||
"nsx_username": {
|
||||
"type": "string",
|
||||
"label": "NSX Username"
|
||||
},
|
||||
"nsx_password": {
|
||||
"type": "string",
|
||||
"label": "NSX Password",
|
||||
"encrypted": true
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"fieldOrder": [
|
||||
"app_name",
|
||||
"env_value",
|
||||
"requester_email",
|
||||
"vm_web",
|
||||
"vm_app",
|
||||
"vm_db",
|
||||
"ports_web_to_app_csv",
|
||||
"ports_app_to_db_csv",
|
||||
"nsx_manager_url",
|
||||
"nsx_username",
|
||||
"nsx_password"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user