vim account creation with additional config param; fix Bug 489 14/6114/2
authorlombardof <flombardo@cnit.it>
Thu, 10 May 2018 09:49:32 +0000 (11:49 +0200)
committerlombardof <flombardo@cnit.it>
Thu, 10 May 2018 12:44:17 +0000 (14:44 +0200)
Change-Id: Ia58e3821acb78f265a25636e216221df34f3f030
Signed-off-by: lombardof <flombardo@cnit.it>
12 files changed:
instancehandler/views.py
vimhandler/template/config/aws.html
vimhandler/template/config/aws_show.html
vimhandler/template/config/openstack.html
vimhandler/template/config/openstack_show.html
vimhandler/template/config/openvim.html
vimhandler/template/config/openvim_show.html
vimhandler/template/config/vmware.html
vimhandler/template/config/vmware_show.html
vimhandler/template/vim_create.html
vimhandler/template/vim_show.html
vimhandler/views.py

index 86d00d5..534579a 100644 (file)
@@ -40,28 +40,29 @@ def create(request, project_id=None):
         "nsdId": request.POST.get('nsdId', ''),
         "vimAccountId": request.POST.get('vimAccountId', ''),
     }
-    if 'ssh_key' in request.POST:
+    if 'ssh_key' in request.POST and request.POST.get('ssh_key') != '':
         ns_data["ssh-authorized-key"] = [request.POST.get('ssh_key')]
 
     if 'config' in request.POST:
         ns_config = yaml.load(request.POST.get('config'))
-        if "vim-network-name" in ns_config:
-            ns_config["vld"] = ns_config.pop("vim-network-name")
-        if "vld" in ns_config:
-            for vld in ns_config["vld"]:
-                if vld.get("vim-network-name"):
-                    if isinstance(vld["vim-network-name"], dict):
-                        vim_network_name_dict = {}
-                        for vim_account, vim_net in vld["vim-network-name"].items():
-                            vim_network_name_dict[ns_data["vimAccountId"]] = vim_net
-                        vld["vim-network-name"] = vim_network_name_dict
-            ns_data["vld"] = ns_config["vld"]
-        if "vnf" in ns_config:
-            for vnf in ns_config["vnf"]:
-                if vnf.get("vim_account"):
-                    vnf["vimAccountId"] = ns_data["vimAccountId"]
-
-            ns_data["vnf"] = ns_config["vnf"]
+        if isinstance(ns_config, dict):
+            if "vim-network-name" in ns_config:
+                ns_config["vld"] = ns_config.pop("vim-network-name")
+            if "vld" in ns_config:
+                for vld in ns_config["vld"]:
+                    if vld.get("vim-network-name"):
+                        if isinstance(vld["vim-network-name"], dict):
+                            vim_network_name_dict = {}
+                            for vim_account, vim_net in vld["vim-network-name"].items():
+                                vim_network_name_dict[ns_data["vimAccountId"]] = vim_net
+                            vld["vim-network-name"] = vim_network_name_dict
+                ns_data["vld"] = ns_config["vld"]
+            if "vnf" in ns_config:
+                for vnf in ns_config["vnf"]:
+                    if vnf.get("vim_account"):
+                        vnf["vimAccountId"] = ns_data["vimAccountId"]
+
+                ns_data["vnf"] = ns_config["vnf"]
     print ns_data
     client = Client()
     result = client.ns_create(ns_data)
index 911e927..5bf7f0a 100644 (file)
@@ -1,76 +1,71 @@
-<div class="panel" id="aws_config" style="display: none;">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#aws_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="aws_config_collapse" class="panel-collapse collapse ">
-        <div class="col-lg-6">
-            <div class="row">
-                <div class="form-group">
-                    <label for="aws_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="aws_sdn_ctrl" name="config_sdn_controller"
-                               placeholder="sdn_controller">
-                    </div>
+<div id="aws_config_collapse" class="config-vim row">
+    <div class="col-lg-6">
+        <div class="row">
+            <div class="form-group">
+                <label for="aws_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="aws_sdn_ctrl" name="config_sdn_controller"
+                           placeholder="sdn_controller">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="aws_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="aws_sdn_port_map" name="config_sdn_port_mapping"
-                               placeholder="sdn_port_mapping">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="aws_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="aws_sdn_port_map"
+                           name="config_sdn_port_mapping"
+                           placeholder="sdn_port_mapping">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="aws_region_name" class="col-sm-4 control-label">Region name</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="aws_region_name" name="config_region_name"
-                               placeholder="region_name">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="aws_region_name" class="col-sm-4 control-label">Region name</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="aws_region_name" name="config_region_name"
+                           placeholder="region_name">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vpc_cidr_block" class="col-sm-4 control-label">VPC cidr block</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vpc_cidr_block" name="config_vpc_cidr_block"
-                               placeholder="vpc_cidr_block">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vpc_cidr_block" class="col-sm-4 control-label">VPC cidr block</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vpc_cidr_block" name="config_vpc_cidr_block"
+                           placeholder="vpc_cidr_block">
                 </div>
             </div>
-
         </div>
 
-        <div class="col-lg-6">
-            <div class="row">
-                <div class="form-group">
-                    <label for="aws_security_groups" class="col-sm-4 control-label">Security groups</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="aws_security_groups" name="config_security_groups"
-                               placeholder="security_groups">
-                    </div>
+    </div>
+
+    <div class="col-lg-6">
+        <div class="row">
+            <div class="form-group">
+                <label for="aws_security_groups" class="col-sm-4 control-label">Security groups</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="aws_security_groups"
+                           name="config_security_groups"
+                           placeholder="security_groups">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="aws_key_pair" class="col-sm-4 control-label">Key pair</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="aws_key_pair" name="config_key_pair"
-                               placeholder="key_pair">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="aws_key_pair" class="col-sm-4 control-label">Key pair</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="aws_key_pair" name="config_key_pair"
+                           placeholder="key_pair">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="aws_flavor_info" class="col-sm-4 control-label">Flavor info</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="aws_flavor_info" name="config_flavor_info"
-                               placeholder="flavor_info">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="aws_flavor_info" class="col-sm-4 control-label">Flavor info</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="aws_flavor_info" name="config_flavor_info"
+                           placeholder="flavor_info">
                 </div>
             </div>
         </div>
index 428294a..9323d41 100644 (file)
@@ -1,56 +1,49 @@
-<div class="panel" id="aws_config">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#aws_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="aws_config_collapse" class="panel-collapse collapse ">
-        <div class="col-lg-6">
-            <div class="row">
-                    <label for="aws_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="aws_sdn_ctrl"> {{datacenter.sdn_ctrl||default:"---" }}</p>
-                    </div>
+<div id="aws_config_collapse" class="config-vim row">
+    <div class="col-lg-6">
+        <div class="row">
+            <label for="aws_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="aws_sdn_ctrl"> {{ datacenter.sdn_ctrl||default:"---" }}</p>
             </div>
-            <div class="row">
-                    <label for="aws_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="aws_sdn_port_map"> {{datacenter.sdn_port_map||default:"---" }}</p>
-                    </div>
+        </div>
+        <div class="row">
+            <label for="aws_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="aws_sdn_port_map"> {{ datacenter.sdn_port_map||default:"---" }}</p>
             </div>
-            <div class="row">
-                    <label for="aws_region_name" class="col-sm-4 control-label">Region name</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="aws_region_name"> {{datacenter.region_name||default:"---" }}</p>
-                    </div>
+        </div>
+        <div class="row">
+            <label for="aws_region_name" class="col-sm-4 control-label">Region name</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="aws_region_name"> {{ datacenter.region_name||default:"---" }}</p>
             </div>
-            <div class="row">
-                    <label for="vpc_cidr_block" class="col-sm-4 control-label">VPC cidr block</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="vpc_cidr_block"> {{datacenter.vpc_cidr_block||default:"---" }}</p>
-                    </div>
+        </div>
+        <div class="row">
+            <label for="vpc_cidr_block" class="col-sm-4 control-label">VPC cidr block</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vpc_cidr_block"> {{ datacenter.vpc_cidr_block||default:"---" }}</p>
             </div>
-
         </div>
 
-        <div class="col-lg-6">
-            <div class="row">
-                    <label for="aws_security_groups" class="col-sm-4 control-label">Security groups</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="aws_security_groups"> {{datacenter.security_groups||default:"---" }}</p>
-                    </div>
+    </div>
+
+    <div class="col-lg-6">
+        <div class="row">
+            <label for="aws_security_groups" class="col-sm-4 control-label">Security groups</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="aws_security_groups"> {{ datacenter.security_groups||default:"---" }}</p>
             </div>
-            <div class="row">
-                    <label for="aws_key_pair" class="col-sm-4 control-label">Key pair</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="aws_key_pair"> {{datacenter.key_pair||default:"---" }}</p>
-                    </div>
+        </div>
+        <div class="row">
+            <label for="aws_key_pair" class="col-sm-4 control-label">Key pair</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="aws_key_pair"> {{ datacenter.key_pair||default:"---" }}</p>
             </div>
-            <div class="row">
-                    <label for="aws_flavor_info" class="col-sm-4 control-label">Flavor info</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <p id="aws_flavor_info"> {{datacenter.flavor_info||default:"---" }}</p>
-                    </div>
+        </div>
+        <div class="row">
+            <label for="aws_flavor_info" class="col-sm-4 control-label">Flavor info</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="aws_flavor_info"> {{ datacenter.flavor_info||default:"---" }}</p>
             </div>
         </div>
     </div>
index 63923a0..6a52931 100644 (file)
@@ -1,10 +1,4 @@
-<div class="panel" id="openstack_config" style="display: none;">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#openstack_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="openstack_config_collapse" class="panel-collapse collapse ">
+<div id="openstack_config_collapse" class="config-vim row">
 
     <div class="col-lg-6">
 
@@ -21,7 +15,8 @@
             <div class="form-group">
                 <label for="ostack_ssdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="ostack_ssdn_port_map" name="config_sdn_port_mapping"
+                    <input disabled class="form-control config-input" id="ostack_ssdn_port_map"
+                           name="config_sdn_port_mapping"
                            placeholder="sdn_port_mapping">
                 </div>
             </div>
@@ -39,7 +34,8 @@
             <div class="form-group">
                 <label for="ostack_security_groups" class="col-sm-4 control-label">Security Groups</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="ostack_security_groups" name="config_security_groups"
+                    <input disabled class="form-control config-input" id="ostack_security_groups"
+                           name="config_security_groups"
                            placeholder="security_groups">
                 </div>
             </div>
@@ -48,7 +44,8 @@
             <div class="form-group">
                 <label for="availability_zone" class="col-sm-4 control-label">Availability Zone</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="availability_zone" name="config_availability_zone"
+                    <input disabled class="form-control config-input" id="availability_zone"
+                           name="config_availability_zone"
                            placeholder="availability_zone">
                 </div>
             </div>
             <div class="form-group">
                 <label for="APIversion" class="col-sm-4 control-label">API version</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="APIversion" name="config_APIversion" placeholder="API version">
+                    <input disabled class="form-control config-input" id="APIversion" name="config_APIversion"
+                           placeholder="API version">
                 </div>
             </div>
         </div>
             <div class="form-group">
                 <label for="project_domain_id" class="col-sm-4 control-label">Project domain id</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="project_domain_id" name="config_project_domain_id"
+                    <input disabled class="form-control config-input" id="project_domain_id"
+                           name="config_project_domain_id"
                            placeholder="project_domain_id">
                 </div>
             </div>
             <div class="form-group">
                 <label for="project_domain_name" class="col-sm-4 control-label">Project domain name</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="project_domain_name" name="config_project_domain_name"
+                    <input disabled class="form-control config-input" id="project_domain_name"
+                           name="config_project_domain_name"
                            placeholder="project_domain_name">
                 </div>
             </div>
             <div class="form-group">
                 <label for="user_domain_name" class="col-sm-4 control-label">User domain name</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="user_domain_name" name="config_user_domain_name"
+                    <input disabled class="form-control config-input" id="user_domain_name"
+                           name="config_user_domain_name"
                            placeholder="user_domain_name">
                 </div>
             </div>
             <div class="form-group">
                 <label for="keypair" class="col-sm-4 control-label">Keypair</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="keypair" name="config_keypair" placeholder="Keypair">
+                    <input disabled class="form-control config-input" id="keypair" name="config_keypair"
+                           placeholder="Keypair">
                 </div>
             </div>
         </div>
             <div class="form-group">
                 <label for="dataplane_physical_net" class="col-sm-4 control-label">Dataplane physical net</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="dataplane_physical_net" name="config_dataplane_physical_net"
+                    <input disabled class="form-control config-input" id="dataplane_physical_net"
+                           name="config_dataplane_physical_net"
                            placeholder="dataplane_physical_net">
                 </div>
             </div>
                 </div>
             </div>
         </div>
-        <div class="row">
-            <div class="form-group">
-                <label for="dataplane_net_vlan_range" class="col-sm-4 control-label">Dataplane net vlan range</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="dataplane_net_vlan_range" name="config_dataplane_net_vlan_range"
-                           placeholder="dataplane_net_vlan_range">
-                </div>
-            </div>
-        </div>
+
         <div class="row">
             <div class="form-group">
                 <label for="microversion" class="col-sm-4 control-label">Microversion</label>
 
     </div>
 </div>
-</div>
\ No newline at end of file
index 7b39222..5388b69 100644 (file)
-<div class="panel" id="openstack_config">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#openstack_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="openstack_config_collapse" class="panel-collapse collapse ">
+<div id="openstack_config_collapse" class="config-vim row">
 
-        <div class="col-lg-6">
+    <div class="col-lg-6">
 
-            <div class="row">
-                <label for="ostack_sdn_ctrl" class="col-sm-4 control-label">SDN Controller:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="ostack_sdn_ctrl"> {{datacenter.sdn_ctrl|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="ostack_ssdn_port_map" class="col-sm-4 control-label">SDN Port Mapping:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="ostack_ssdn_port_map"> {{datacenter.sdn_port_map|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="ostack_security_groups" class="col-sm-4 control-label">Security Groups:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="ostack_security_groups"> {{datacenter.security_groups|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="availability_zone" class="col-sm-4 control-label">Availability Zone:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="availability_zone"> {{datacenter.availability_zone|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="ostack_region_name" class="col-sm-4 control-label">Region Name:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="ostack_region_name"> {{datacenter.region_name|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="option_insecure" class="col-sm-4 control-label">Insecure:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="option_insecure"> {{datacenter.insecure|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="use_existing_flavors" class="col-sm-4 control-label">Use existing flavors:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="use_existing_flavors"> {{datacenter.use_existing_flavors|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="use_internal_endpoint" class="col-sm-4 control-label">Use internal endpoint:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="use_internal_endpoint"> {{datacenter.use_internal_endpoint|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="APIversion" class="col-sm-4 control-label">API version:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="APIversion"> {{datacenter.APIversion|default:"---" }}</p>
-                </div>
+        <div class="row">
+            <label for="ostack_sdn_ctrl" class="col-sm-4 control-label">SDN Controller:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="ostack_sdn_ctrl"> {{ datacenter.sdn_ctrl|default:"---" }}</p>
             </div>
-
         </div>
-        <div class="col-lg-6">
-            <div class="row">
-
-                <label for="project_domain_id" class="col-sm-4 control-label">Project domain id:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="project_domain_id"> {{datacenter.project_domain_id|default:"---" }}</p>
-                </div>
+        <div class="row">
+            <label for="ostack_ssdn_port_map" class="col-sm-4 control-label">SDN Port Mapping:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="ostack_ssdn_port_map"> {{ datacenter.sdn_port_map|default:"---" }}</p>
             </div>
-            <div class="row">
-
-                <label for="project_domain_name" class="col-sm-4 control-label">Project domain name:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="project_domain_name"> {{datacenter.project_domain_name|default:"---" }}</p>
-                </div>
+        </div>
+        <div class="row">
+            <label for="ostack_security_groups" class="col-sm-4 control-label">Security Groups:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="ostack_security_groups"> {{ datacenter.security_groups|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+            <label for="availability_zone" class="col-sm-4 control-label">Availability Zone:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="availability_zone"> {{ datacenter.availability_zone|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+            <label for="ostack_region_name" class="col-sm-4 control-label">Region Name:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="ostack_region_name"> {{ datacenter.region_name|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+            <label for="option_insecure" class="col-sm-4 control-label">Insecure:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="option_insecure"> {{ datacenter.insecure|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+            <label for="use_existing_flavors" class="col-sm-4 control-label">Use existing flavors:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="use_existing_flavors"> {{ datacenter.use_existing_flavors|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+            <label for="use_internal_endpoint" class="col-sm-4 control-label">Use internal endpoint:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="use_internal_endpoint"> {{ datacenter.use_internal_endpoint|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+            <label for="APIversion" class="col-sm-4 control-label">API version:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="APIversion"> {{ datacenter.APIversion|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
 
-                <label for="user_domain_id" class="col-sm-4 control-label">User domain id:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="user_domain_id"> {{datacenter.user_domain_id|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
-                <label for="user_domain_name" class="col-sm-4 control-label">User domain name:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="user_domain_name"> {{datacenter.user_domain_name|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
+    </div>
+    <div class="col-lg-6">
+        <div class="row">
 
-                <label for="keypair" class="col-sm-4 control-label">Keypair:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="keypair"> {{datacenter.keypair|default:"---" }}</p></div>
+            <label for="project_domain_id" class="col-sm-4 control-label">Project domain id:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="project_domain_id"> {{ datacenter.project_domain_id|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="dataplane_physical_net" class="col-sm-4 control-label">Dataplane physical net:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="dataplane_physical_net"> {{datacenter.dataplane_physical_net|default:"---" }}</p>
-                </div>
+            <label for="project_domain_name" class="col-sm-4 control-label">Project domain name:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="project_domain_name"> {{ datacenter.project_domain_name|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="use_floating_ip" class="col-sm-4 control-label">Use floating ip:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="use_floating_ip"> {{datacenter.use_floating_ip|default:"---" }}</p>
-                </div>
+            <label for="user_domain_id" class="col-sm-4 control-label">User domain id:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="user_domain_id"> {{ datacenter.user_domain_id|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
+            <label for="user_domain_name" class="col-sm-4 control-label">User domain name:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="user_domain_name"> {{ datacenter.user_domain_name|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
 
-                <label for="dataplane_net_vlan_range" class="col-sm-4 control-label">Dataplane net vlan range:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="dataplane_net_vlan_range"> {{datacenter.dataplane_net_vlan_range|default:"---" }}</p>
-                </div>
+            <label for="keypair" class="col-sm-4 control-label">Keypair:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="keypair"> {{ datacenter.keypair|default:"---" }}</p></div>
+        </div>
+        <div class="row">
+
+            <label for="dataplane_physical_net" class="col-sm-4 control-label">Dataplane physical net:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="dataplane_physical_net"> {{ datacenter.dataplane_physical_net|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="microversion" class="col-sm-4 control-label">Microversion:</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="microversion"> {{datacenter.microversion|default:"---" }}</p></div>
+            <label for="use_floating_ip" class="col-sm-4 control-label">Use floating ip:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="use_floating_ip"> {{ datacenter.use_floating_ip|default:"---" }}</p>
             </div>
         </div>
+        <div class="row">
+
+            <label for="dataplane_net_vlan_range" class="col-sm-4 control-label">Dataplane net vlan range:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="dataplane_net_vlan_range"> {{ datacenter.dataplane_net_vlan_range|default:"---" }}</p>
+            </div>
+        </div>
+        <div class="row">
+
+            <label for="microversion" class="col-sm-4 control-label">Microversion:</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="microversion"> {{ datacenter.microversion|default:"---" }}</p></div>
+        </div>
     </div>
-</div>
\ No newline at end of file
+</div>
index 1989665..e5a67aa 100644 (file)
@@ -1,16 +1,11 @@
-<div class="panel" id="openvim_config" style="display: none;">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#openvim_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="openvim_config_collapse" class="col-lg-6 panel-collapse collapse ">
-
+<div id="openvim_config_collapse" class="config-vim row">
+    <div class="col-lg-6">
         <div class="row ">
             <div class="form-group">
                 <label for="ov_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="ov_sdn_ctrl" name="config_sdn_controller" placeholder="sdn_controller">
+                    <input disabled class="form-control config-input" id="ov_sdn_ctrl" name="config_sdn_controller"
+                           placeholder="sdn_controller">
                 </div>
             </div>
         </div>
@@ -18,7 +13,8 @@
             <div class="form-group">
                 <label for="ov_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
                 <div class="col-sm-6 input-group input-group-sm">
-                    <input disabled class="form-control config-input" id="ov_sdn_port_map" name="config_sdn_port_mapping"
+                    <input disabled class="form-control config-input" id="ov_sdn_port_map"
+                           name="config_sdn_port_mapping"
                            placeholder="sdn_port_mapping">
                 </div>
             </div>
index dbe57dd..afc1b9d 100644 (file)
@@ -1,23 +1,18 @@
-<div class="panel" id="openvim_config" >
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#openvim_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="openvim_config_collapse" class="col-lg-6 panel-collapse collapse ">
+<div id="openvim_config_collapse" class="config-vim row">
 
+    <div class="col-lg-6">
         <div class="row ">
-            
-                <label for="ov_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="ov_sdn_ctrl"> {{datacenter.sdn_ctrl|default:"---" }}</p>
-                </div>
+
+            <label for="ov_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="ov_sdn_ctrl"> {{ datacenter.sdn_ctrl|default:"---" }}</p>
+            </div>
         </div>
         <div class="row">
-                <label for="ov_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="ov_sdn_port_map"> {{datacenter.sdn_port_map|default:"---" }}</p>
-                </div>
+            <label for="ov_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="ov_sdn_port_map"> {{ datacenter.sdn_port_map|default:"---" }}</p>
+            </div>
         </div>
     </div>
-</div>
\ No newline at end of file
+</div>
index 8e8882f..9f01387 100644 (file)
-<div class="panel" id="vmware_config" style="display: none;">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#vmware_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="vmware_config_collapse" class="panel-collapse collapse ">
-        <div class="col-lg-6">
-            <div class="row">
-                <div class="form-group">
-                    <label for="vmware_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vmware_sdn_ctrl" name="config_sdn_controller"
-                               placeholder="sdn_controller">
-                    </div>
+<div id="vmware_config_collapse" class="config-vim row">
+    <div class="col-lg-6">
+        <div class="row">
+            <div class="form-group">
+                <label for="vmware_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vmware_sdn_ctrl" name="config_sdn_controller"
+                           placeholder="sdn_controller">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vmware_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vmware_sdn_port_map" name="config_sdn_port_mapping"
-                               placeholder="sdn_port_mapping">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vmware_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vmware_sdn_port_map"
+                           name="config_sdn_port_mapping"
+                           placeholder="sdn_port_mapping">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="orgname" class="col-sm-4 control-label">Org. name</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="orgname" name="config_orgname"
-                               placeholder="orgname">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="orgname" class="col-sm-4 control-label">Org. name</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="orgname" name="config_orgname"
+                           placeholder="orgname">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="admin_username" class="col-sm-4 control-label">Admin username</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="admin_username" name="config_admin_username"
-                               placeholder="admin_username">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="admin_username" class="col-sm-4 control-label">Admin username</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="admin_username" name="config_admin_username"
+                           placeholder="admin_username">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="admin_password" class="col-sm-4 control-label">Admin password</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" type="password" id="admin_password" name="config_admin_password"
-                               placeholder="admin_password">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="admin_password" class="col-sm-4 control-label">Admin password</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" type="password" id="admin_password"
+                           name="config_admin_password"
+                           placeholder="admin_password">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="nsx_manager" class="col-sm-4 control-label">Nsx manager</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="nsx_manager" name="config_nsx_manager"
-                               placeholder="nsx_manager">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="nsx_manager" class="col-sm-4 control-label">Nsx manager</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="nsx_manager" name="config_nsx_manager"
+                           placeholder="nsx_manager">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="nsx_user" class="col-sm-4 control-label">Nsx user</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="nsx_user" name="config_nsx_user"
-                               placeholder="nsx_user">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="nsx_user" class="col-sm-4 control-label">Nsx user</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="nsx_user" name="config_nsx_user"
+                           placeholder="nsx_user">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="nsx_password" class="col-sm-4 control-label">Nsx password</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled type="password" class="form-control config-input" id="nsx_password" name="config_nsx_password"
-                               placeholder="nsx_password">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="nsx_password" class="col-sm-4 control-label">Nsx password</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled type="password" class="form-control config-input" id="nsx_password"
+                           name="config_nsx_password"
+                           placeholder="nsx_password">
                 </div>
             </div>
         </div>
-        <div class="col-lg-6">
-            <div class="row">
-                <div class="form-group">
-                    <label for="vcenter_ip" class="col-sm-4 control-label">Vcenter ip</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vcenter_ip" name="config_vcenter_ip"
-                               placeholder="vcenter_ip">
-                    </div>
+    </div>
+    <div class="col-lg-6">
+        <div class="row">
+            <div class="form-group">
+                <label for="vcenter_ip" class="col-sm-4 control-label">Vcenter ip</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vcenter_ip" name="config_vcenter_ip"
+                           placeholder="vcenter_ip">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vcenter_port" class="col-sm-4 control-label">Vcenter port</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vcenter_port" name="config_vcenter_port"
-                               placeholder="vcenter_port">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vcenter_port" class="col-sm-4 control-label">Vcenter port</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vcenter_port" name="config_vcenter_port"
+                           placeholder="vcenter_port">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vcenter_user" class="col-sm-4 control-label">Vcenter user</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vcenter_user" name="config_vcenter_user"
-                               placeholder="vcenter_user">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vcenter_user" class="col-sm-4 control-label">Vcenter user</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vcenter_user" name="config_vcenter_user"
+                           placeholder="vcenter_user">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vcenter_password" class="col-sm-4 control-label">Vcenter password</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled type="password" class="form-control config-input" id="vcenter_password" name="config_vcenter_password"
-                               placeholder="vcenter_password">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vcenter_password" class="col-sm-4 control-label">Vcenter password</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled type="password" class="form-control config-input" id="vcenter_password"
+                           name="config_vcenter_password"
+                           placeholder="vcenter_password">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vrops_site" class="col-sm-4 control-label">Vrops site</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vrops_site" name="config_vrops_site"
-                               placeholder="vrops_site">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vrops_site" class="col-sm-4 control-label">Vrops site</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vrops_site" name="config_vrops_site"
+                           placeholder="vrops_site">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vrops_user" class="col-sm-4 control-label">Vrops user</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" id="vrops_user" name="config_vrops_user"
-                               placeholder="vrops_user">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vrops_user" class="col-sm-4 control-label">Vrops user</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" id="vrops_user" name="config_vrops_user"
+                           placeholder="vrops_user">
                 </div>
             </div>
-            <div class="row">
-                <div class="form-group">
-                    <label for="vrops_password" class="col-sm-4 control-label">Vrops password</label>
-                    <div class="col-sm-6 input-group input-group-sm">
-                        <input disabled class="form-control config-input" type="password" id="vrops_password" name="config_vrops_password"
-                               placeholder="vrops_password">
-                    </div>
+        </div>
+        <div class="row">
+            <div class="form-group">
+                <label for="vrops_password" class="col-sm-4 control-label">Vrops password</label>
+                <div class="col-sm-6 input-group input-group-sm">
+                    <input disabled class="form-control config-input" type="password" id="vrops_password"
+                           name="config_vrops_password"
+                           placeholder="vrops_password">
                 </div>
             </div>
         </div>
     </div>
-</div>
\ No newline at end of file
+</div>
index 74204c2..8b98043 100644 (file)
-<div class="panel" id="vmware_config" style="display: none;">
-    <h5 class="box-title">
-        <a data-toggle="collapse" data-parent="#accordion" href="#vmware_config_collapse">
-            Config parameters
-        </a>
-    </h5>
-    <div id="vmware_config_collapse" class="panel-collapse collapse ">
-        <div class="col-lg-6">
-            <div class="row">
-
-                <label for="vmware_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vmware_sdn_ctrl"> {{datacenter.sdn_ctrl|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
+<div id="vmware_config_collapse" class="config-vim row">
 
-                <label for="vmware_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vmware_sdn_port_map"> {{datacenter.sdn_port_map|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
+    <div class="col-lg-6">
+        <div class="row">
 
-                <label for="orgname" class="col-sm-4 control-label">Org. name</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="orgname"> {{datacenter.orgname|default:"---" }}</p>
-                </div>
+            <label for="vmware_sdn_ctrl" class="col-sm-4 control-label">SDN Controller</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vmware_sdn_ctrl"> {{ datacenter.sdn_ctrl|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="admin_username" class="col-sm-4 control-label">Admin username</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="admin_username"> {{datacenter.admin_username|default:"---" }}</p>
-                </div>
+            <label for="vmware_sdn_port_map" class="col-sm-4 control-label">SDN Port Mapping</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vmware_sdn_port_map"> {{ datacenter.sdn_port_map|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="admin_password" class="col-sm-4 control-label">Admin password</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="admin_password"> {{datacenter.admin_password|default:"---" }}</p>
-                </div>
+            <label for="orgname" class="col-sm-4 control-label">Org. name</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="orgname"> {{ datacenter.orgname|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="nsx_manager" class="col-sm-4 control-label">Nsx manager</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="nsx_manager"> {{datacenter.nsx_manager|default:"---" }}</p>
-                </div>
+            <label for="admin_username" class="col-sm-4 control-label">Admin username</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="admin_username"> {{ datacenter.admin_username|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="nsx_user" class="col-sm-4 control-label">Nsx user</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="nsx_user"> {{datacenter.nsx_user|default:"---" }}</p>
-                </div>
+            <label for="admin_password" class="col-sm-4 control-label">Admin password</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="admin_password"> {{ datacenter.admin_password|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="nsx_password" class="col-sm-4 control-label">Nsx password</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="nsx_password"> {{datacenter.nsx_password|default:"---" }}</p>
-                </div>
+            <label for="nsx_manager" class="col-sm-4 control-label">Nsx manager</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="nsx_manager"> {{ datacenter.nsx_manager|default:"---" }}</p>
             </div>
         </div>
-        <div class="col-lg-6">
-            <div class="row">
+        <div class="row">
 
-                <label for="vcenter_ip" class="col-sm-4 control-label">Vcenter ip</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vcenter_ip"> {{datacenter.vcenter_ip|default:"---" }}</p>
-                </div>
+            <label for="nsx_user" class="col-sm-4 control-label">Nsx user</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="nsx_user"> {{ datacenter.nsx_user|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="vcenter_port" class="col-sm-4 control-label">Vcenter port</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vcenter_port"> {{datacenter.vcenter_port|default:"---" }}</p></div>
+            <label for="nsx_password" class="col-sm-4 control-label">Nsx password</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="nsx_password"> {{ datacenter.nsx_password|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+    </div>
+    <div class="col-lg-6">
+        <div class="row">
 
-                <label for="vcenter_user" class="col-sm-4 control-label">Vcenter user</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vcenter_user"> {{datacenter.vcenter_user|default:"---" }}</p></div>
+            <label for="vcenter_ip" class="col-sm-4 control-label">Vcenter ip</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vcenter_ip"> {{ datacenter.vcenter_ip|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
 
-                <label for="vcenter_password" class="col-sm-4 control-label">Vcenter password</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vcenter_password"> {{datacenter.vcenter_password|default:"---" }}</p>
-                </div>
-            </div>
-            <div class="row">
+            <label for="vcenter_port" class="col-sm-4 control-label">Vcenter port</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vcenter_port"> {{ datacenter.vcenter_port|default:"---" }}</p></div>
+        </div>
+        <div class="row">
 
-                <label for="vrops_site" class="col-sm-4 control-label">Vrops site</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vrops_site"> {{datacenter.vrops_site|default:"---" }}</p></div>
-            </div>
-            <div class="row">
+            <label for="vcenter_user" class="col-sm-4 control-label">Vcenter user</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vcenter_user"> {{ datacenter.vcenter_user|default:"---" }}</p></div>
+        </div>
+        <div class="row">
 
-                <label for="vrops_user" class="col-sm-4 control-label">Vrops user</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vrops_user"> {{datacenter.vrops_user|default:"---" }}</p></div>
+            <label for="vcenter_password" class="col-sm-4 control-label">Vcenter password</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vcenter_password"> {{ datacenter.vcenter_password|default:"---" }}</p>
             </div>
-            <div class="row">
+        </div>
+        <div class="row">
+
+            <label for="vrops_site" class="col-sm-4 control-label">Vrops site</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vrops_site"> {{ datacenter.vrops_site|default:"---" }}</p></div>
+        </div>
+        <div class="row">
+
+            <label for="vrops_user" class="col-sm-4 control-label">Vrops user</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vrops_user"> {{ datacenter.vrops_user|default:"---" }}</p></div>
+        </div>
+        <div class="row">
 
-                <label for="vrops_password" class="col-sm-4 control-label">Vrops password</label>
-                <div class="col-sm-6 input-group input-group-sm">
-                    <p id="vrops_password"> {{datacenter.vrops_password|default:"---" }}</p>
-                </div>
+            <label for="vrops_password" class="col-sm-4 control-label">Vrops password</label>
+            <div class="col-sm-6 input-group input-group-sm">
+                <p id="vrops_password"> {{ datacenter.vrops_password|default:"---" }}</p>
             </div>
         </div>
     </div>
-</div>
\ No newline at end of file
+</div>
index 477f0be..7ad54af 100644 (file)
@@ -1,23 +1,6 @@
 {% extends "base.html" %}
 {% load get %}
 {% load staticfiles %}
-{% block head_base %}
-    {% with skin_css="AdminLTE/dist/css/skins/skin-purple.min.css"%}
-        {{ block.super }}
-    {% endwith %}
-{% endblock %}
-
-{% block body %}
-    {% with skin="purple"%}
-        {{ block.super }}
-    {% endwith %}
-{% endblock %}
-{% block logo_sidebar %}
-    {% with logo_mini="assets/img/osm_small_logo.png" logo="assets/img/OSM-logo.png" %}
-        {{ block.super }}
-    {% endwith %}
-{% endblock %}
-
 
 
 {% block head_block %}
 {% block content_body %}
     {{ block.super }}
 
-<div class="row">
-    <div class="col-md-12">
-        <form action='{% url "vim:create" %}' method="post">
-            {% csrf_token %}
-            <div class="box">
-                <div class="box-header with-border">
-                    <h3 class="box-title">New VIM Account</h3>
-                    <div class="box-tools">
+    <div class="row">
+        <div class="col-md-12">
+            <form action='{% url "vim:create" %}' method="post">
+                {% csrf_token %}
+                <div class="box">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">NEW VIM ACCOUNT</h3>
+                        <div class="box-tools">
 
+                        </div>
                     </div>
-                </div>
-                <div class="box-body">
-
-                    <div class="row">
-                        <div class="col-lg-6">
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="name" class="col-sm-3 control-label">Name*</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input class="form-control" id="name" name="name" placeholder="VIM name" required>
+                    <div class="box-body">
+
+                        <div class="row">
+                            <div class="col-lg-6">
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="name" class="col-sm-3 control-label">Name*</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input class="form-control" id="name" name="name" placeholder="VIM name"
+                                                   required>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="vim_user" class="col-sm-3 control-label">Vim Username*</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input class="form-control" id="vim_user" name="vim_user" placeholder="Vim Username" required>
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="vim_user" class="col-sm-3 control-label">Vim Username*</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input class="form-control" id="vim_user" name="vim_user"
+                                                   placeholder="Vim Username" required>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="vim_password" class="col-sm-3 control-label">Vim Password*</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input type="password" class="form-control" id="vim_password" name="vim_password" placeholder="Vim Password" required>
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="vim_password" class="col-sm-3 control-label">Vim Password*</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input type="password" class="form-control" id="vim_password"
+                                                   name="vim_password" placeholder="Vim Password" required>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="vim_url" class="col-sm-3 control-label">Vim URL*</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input type="url" class="form-control" id="vim_url" name="vim_url" placeholder="Vim URL" required>
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="vim_url" class="col-sm-3 control-label">Vim URL*</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input type="url" class="form-control" id="vim_url" name="vim_url"
+                                                   placeholder="Vim URL" required>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="vim_type" class="col-sm-3 control-label">Type*</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <select id="vim_type" name="vim_type" class="form-control" onchange="toggleConfig(this)">
-                                            <option value="openvim">OpenVIM</option>
-                                          <option value="openstack">Openstack</option>
-                                          <option value="vmware">VMware vCD</option>
-                                          <option value="aws">AWS</option>
-                                        </select>
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="vim_type" class="col-sm-3 control-label">Type*</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <select id="vim_type" name="vim_type" class="form-control"
+                                                    onchange="toggleConfig(this)">
+                                                <option value="openvim">OpenVIM</option>
+                                                <option value="openstack">Openstack</option>
+                                                <option value="vmware">VMware vCD</option>
+                                                <option value="aws">AWS</option>
+                                            </select>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-
-
-
-
 
 
-                        </div>
-                        <div class="col-lg-6">
-                                                        <div class="row">
-                                <div class="form-group">
-                                    <label for="vim_tenant_name" class="col-sm-3 control-label">Tenant name*</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input class="form-control" id="vim_tenant_name" name="vim_tenant_name" placeholder="Tenant name" required>
+                            </div>
+                            <div class="col-lg-6">
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="vim_tenant_name" class="col-sm-3 control-label">Tenant name*</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input class="form-control" id="vim_tenant_name" name="vim_tenant_name"
+                                                   placeholder="Tenant name" required>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="description" class="col-sm-3 control-label">Description</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input class="form-control" id="description" name="description" placeholder="Description">
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="description" class="col-sm-3 control-label">Description</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input class="form-control" id="description" name="description"
+                                                   placeholder="Description">
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="schema_type" class="col-sm-3 control-label">Schema Type</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input class="form-control" id="schema_type" name="schema_type" placeholder="Schema Type">
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="schema_type" class="col-sm-3 control-label">Schema Type</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input class="form-control" id="schema_type" name="schema_type"
+                                                   placeholder="Schema Type">
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="row">
+                                    <div class="form-group">
+                                        <label for="schema_version" class="col-sm-3 control-label">Schema
+                                            Version</label>
+                                        <div class="col-sm-6 input-group input-group-sm">
+                                            <input class="form-control" id="schema_version" name="schema_version"
+                                                   placeholder="Schema Version">
+                                        </div>
                                     </div>
                                 </div>
                             </div>
-                            <div class="row">
-                                <div class="form-group">
-                                    <label for="schema_version" class="col-sm-3 control-label">Schema Version</label>
-                                    <div class="col-sm-6 input-group input-group-sm">
-                                        <input class="form-control" id="schema_version" name="schema_version" placeholder="Schema Version" >
+
+
+                        </div>
+
+                        <div id="config" class="panel box">
+
+                                <a data-toggle="collapse" data-parent="#accordion" href="#config_collapse"
+                                   aria-expanded="false" class="collapsed" style="color:black">
+                                    <h5 class="box-title" style="background-color:#f7f7f7; text-align: center;">
+                                        CONFIG PARAMETERS
+                                    </h5>
+                                </a>
+
+
+                            <div id="config_collapse" class="panel-collapse collapse ">
+                                {% include 'config/openvim.html' %}
+                                {% include 'config/openstack.html' %}
+                                {% include 'config/vmware.html' %}
+                                {% include 'config/aws.html' %}
+
+                                <div class="row">
+                                    <div class="col-lg-6">
+                                        <div class="row ">
+                                            <div class="form-group">
+                                                <label for="additional_conf" class="col-sm-4 control-label">Additional configuration</label>
+                                                <div class="col-sm-6 input-group input-group-sm">
+                                                    <input class="form-control" id="additional_conf"
+                                                           name="additional_conf"
+                                                           placeholder='{ "key1": [...],  "key2": {}, "key3": "" }'>
+                                                </div>
+                                            </div>
+                                        </div>
                                     </div>
                                 </div>
+
                             </div>
                         </div>
 
 
                     </div>
-                    {% include 'config/openvim.html' %}
-                    {% include 'config/openstack.html' %}
-                    {% include 'config/vmware.html' %}
-                    {% include 'config/aws.html' %}
-
-                </div>
-                <div class="box-footer">
-                    <button onclick="location.href='{% url 'vim:list' %}'" class="btn btn-default pull-left">Back to VIM Accounts</button>
-                    <button class="btn btn-primary pull-right">Create</button>
+                    <div class="box-footer">
+                        <button onclick="location.href='{% url 'vim:list' %}'" class="btn btn-default pull-left">Back to
+                            VIM Accounts
+                        </button>
+                        <button class="btn btn-primary pull-right">Create</button>
+                    </div>
                 </div>
-            </div>
-        </form>
-    </div>
+            </form>
+        </div>
 
-</div>
+    </div>
 {% endblock %}
 
 {% block resource_block %}
             toggleConfig(document.getElementById("vim_type"));
         });
         function toggleConfig(element){
-            $('.panel').hide();
+            $('.config-vim').hide();
             $('.config-input').prop('disabled', true);
             var type_selected = element.options[element.selectedIndex].value;
             console.log("type selected: " + type_selected);
-            var div_config_index = type_selected + '_config';
+            var div_config_index = type_selected + '_config_collapse';
             $('#'+div_config_index).show();
             $('#'+div_config_index+' .config-input').prop('disabled', false);
         }
index 3d34941..2cc533e 100644 (file)
 
 
                 </div>
-                {% if datacenter.vim_type == 'openvim' %}
-                    {% include 'config/openvim_show.html' %}
-                {% elif datacenter.vim_type == 'openstack' %}
-                    {% include 'config/openstack_show.html' %}
-                {% elif datacenter.vim_type == 'vmware' %}
-                    {% include 'config/vmware_show.html' %}
-                {% elif datacenter.vim_type == 'aws' %}
-                    {% include 'config/aws_show.html' %}
-                {% endif %}
+                 <div id="config" class="panel box">
+
+                                <a data-toggle="collapse" data-parent="#accordion" href="#config_collapse"
+                                   aria-expanded="false" class="collapsed" style="color:black">
+                                    <h5 class="box-title" style="background-color:#f7f7f7; text-align: center;">
+                                        CONFIG PARAMETERS
+                                    </h5>
+                                </a>
+
+
+                            <div id="config_collapse" class="panel-collapse collapse ">
+                                {% if datacenter.vim_type == 'openvim' %}
+                                    {% include 'config/openvim_show.html' %}
+                                {% elif datacenter.vim_type == 'openstack' %}
+                                    {% include 'config/openstack_show.html' %}
+                                {% elif datacenter.vim_type == 'vmware' %}
+                                    {% include 'config/vmware_show.html' %}
+                                {% elif datacenter.vim_type == 'aws' %}
+                                    {% include 'config/aws_show.html' %}
+                                {% endif %}
+
+                            </div>
+                        </div>
+
             </div>
             <div class="box-footer">
                 <div class="">
index 817a052..d350704 100644 (file)
@@ -57,6 +57,10 @@ def create(request):
             if str(k).startswith('config_') and len(v) > 0:
                 config_key = k[7:]
                 vim_data['config'][config_key] = v
+        if 'additional_conf' in new_vim_dict:
+            additional_conf_dict = json.loads(new_vim_dict['additional_conf'])
+            for k,v in additional_conf_dict.items():
+                vim_data['config'][k] = v
         print vim_data
         result = client.vim_create(vim_data)
         # TODO  'vim:show', to_redirect=True, vim_id=vim_id