[KUBEV] Extend template to support hybrid lab deployments.

Add VM Compute resource to deploy virtual nodes using virtual BMC
and connect the phys network (pxe) to instances.

Related: KUBEV-414
Change-Id: I7b5409ae1b4336f3ab78ecb63b435a6036200bd9
diff --git a/hco/fragments/VMInstanceCeph.yaml b/hco/fragments/VMInstanceCeph.yaml
index 642fba2..61cbd9e 100644
--- a/hco/fragments/VMInstanceCeph.yaml
+++ b/hco/fragments/VMInstanceCeph.yaml
@@ -50,9 +50,32 @@
       # Don't mount ephemeral0 to /mnt as it's by default
       mounts:
         - [ ephemeral0, null ]
+  hybrid_lab:
+    type: boolean
+    default: false
+  pxe_network:
+    type: string
+    default: ''
+  pxe_subnet:
+    type: string
+    default: ''
+
+conditions:
+
+  connect_pxe_network:
+    get_param: hybrid_lab
 
 resources:
 
+  pxe_network_port:
+    type: OS::Neutron::Port
+    condition: connect_pxe_network
+    properties:
+      network: { get_param: pxe_network }
+      port_security_enabled: false
+      fixed_ips:
+        - subnet: { get_param: pxe_subnet }
+
   k8s_network_port:
     type: OS::Neutron::Port
     properties:
@@ -157,10 +180,18 @@
       flavor: { get_param: flavor }
       key_name: { get_param: key_name }
       networks:
-        - port: { get_resource: k8s_network_port }
-        - network: { get_param : storage_frontend_network }
-        - network: { get_param : storage_backend_network }
-        - network: { get_param : data_network }
+        if:
+          - connect_pxe_network
+          - - port: { get_resource: k8s_network_port }
+            - network: { get_param: storage_frontend_network }
+            - network: { get_param: storage_backend_network }
+            - network: { get_param: data_network }
+            - port: { get_resource: pxe_network_port }
+          - - port: { get_resource: k8s_network_port }
+            - network: { get_param: storage_frontend_network }
+            - network: { get_param: storage_backend_network }
+            - network: { get_param: data_network }
+
       user_data_format: SOFTWARE_CONFIG
       user_data: { get_resource:  install_config_agent}