Bug 5213 - Missing segmentation-id for physical networks
[groupbasedpolicy.git] / neutron-mapper / src / main / yang / neutron-gbp-mapper.yang
index 1e0db7a86c3120305343c687e9775b29f6da89c5..8f3adafb2e8c6c4c85fc31e525cdb25d3cd9650a 100644 (file)
@@ -6,7 +6,10 @@ module neutron-gbp-mapper {
 
     import gbp-common {prefix gbp-common;}
     import endpoint {prefix gbp-endpoint;}
-    import ietf-inet-types {prefix inet;}
+    import ietf-inet-types {
+        prefix inet;
+        revision-date 2010-09-24;
+    }
 
     description 
         "This module defines the mapping model between Neutron entities and GBP entities.";
@@ -22,27 +25,6 @@ module neutron-gbp-mapper {
             type gbp-common:unique-id;
         }
     }
-    
-    grouping internal-port-floating-ip-port-association-fields {
-        leaf floating-ip-port-id {
-            description "A unique ID for the neutron port";
-            type gbp-common:unique-id;
-            mandatory true;
-        }
-        leaf floating-ip-port-ip-address {
-            type inet:ip-address;
-            mandatory true;
-        }
-        leaf internal-port-id {
-            description "A unique ID for the neutron port";
-            type gbp-common:unique-id;
-            mandatory true;
-        }
-        leaf internal-port-ip-address {
-            type inet:ip-address;
-            mandatory true;
-        }
-    }
 
     container mappings {
         description "Mapping of neutron entities by groupbasedpolicy entities and vice versa.";
@@ -58,33 +40,6 @@ module neutron-gbp-mapper {
                     uses neutron-port-key;
                 }
             }
-            container router-gateway-ports-by-endpoints {
-                description "Neutron router gateway ports by groupbasedpolicy endpoint";
-                list router-gateway-port-by-endpoint {
-                    description "Neutron router gateway port key by groupbasedpolicy endpoint key";
-                    key "l2-context mac-address";
-                    uses gbp-endpoint:l2-key;
-                    uses neutron-port-key;
-                }
-            }
-            container router-interface-ports-by-endpoints {
-                description "Neutron router interface ports by groupbasedpolicy endpoint";
-                list router-interface-port-by-endpoint {
-                    description "Neutron router interface port key by groupbasedpolicy endpoint key";
-                    key "l2-context mac-address";
-                    uses gbp-endpoint:l2-key;
-                    uses neutron-port-key;
-                }
-            }
-            container floating-ip-ports-by-endpoints {
-                description "Neutron floating IP ports by groupbasedpolicy endpoint";
-                list floating-ip-port-by-endpoint {
-                    description "Neutron floating ip port key by groupbasedpolicy endpoint key";
-                    key "l2-context mac-address";
-                    uses gbp-endpoint:l2-key;
-                    uses neutron-port-key;
-                }
-            }
 
             container external-gateways-as-l3-endpoints {
                 description "L3Endpoints that represent Neutron External Gateways for External Subnets.
@@ -96,6 +51,27 @@ module neutron-gbp-mapper {
                     uses gbp-endpoint:l3-key;
                 }
             }
+
+            container provider-physical-networks-as-l2-flood-domains {
+                list provider-physical-network-as-l2-flood-domain {
+                    key "tenant-id l2-flood-domain-id";
+                    leaf tenant-id {
+                        description "Tenant of L2 Flood Domain";
+                        type gbp-common:tenant-id;
+                    }
+                    leaf l2-flood-domain-id {
+                        description "The L2 Flood Domain ID";
+                        type gbp-common:l2-flood-domain-id;
+                    }
+                    leaf segmentation-id {
+                        mandatory true;
+                        description "An isolated segment on the physical network. The network-type
+                            attribute defines the segmentation model. For example, if network-type
+                            is vlan, this ID is a vlan identifier.";
+                        type string;
+                    }
+                }
+            }
         }
 
         container gbp-by-neutron-mappings {
@@ -109,50 +85,8 @@ module neutron-gbp-mapper {
                     uses gbp-endpoint:l2-key;
                 }
             }
-            container endpoints-by-router-gateway-ports {
-                description "Groupbasedpolicy endpoints by neutron router gateway ports";
-                list endpoint-by-router-gateway-port {
-                    description "Groupbasedpolicy endpoint key by neutron router gateway port key";
-                    key port-id;
-                    uses neutron-port-key;
-                    uses gbp-endpoint:l2-key;
-                }
-            }
-            container endpoints-by-router-interface-ports {
-                description "Groupbasedpolicy endpoints by neutron router interface ports";
-                list endpoint-by-router-interface-port {
-                    description "Groupbasedpolicy endpoint key by neutron router interface port key";
-                    key port-id;
-                    uses neutron-port-key;
-                    uses gbp-endpoint:l2-key;
-                }
-            }
-            container endpoints-by-floating-ip-ports {
-                description "Groupbasedpolicy endpoints by neutron floating IP ports";
-                list endpoint-by-floating-ip-port {
-                    description "Groupbasedpolicy endpoint key by neutron floating IP port key";
-                    key port-id;
-                    uses neutron-port-key;
-                    uses gbp-endpoint:l2-key;
-                }
-            }
         }
 
-        container floating-ip-association-mappings {
-            description "Mapping of association between neutron port representing floating IP and internal neutron port";
-            container internal-ports-by-floating-ip-ports {
-                list internal-port-by-floating-ip-port {
-                    key floating-ip-port-id;
-                    uses internal-port-floating-ip-port-association-fields;
-                }
-            }
-            container floating-ip-ports-by-internal-ports {
-                list floating-ip-port-by-internal-port {
-                    key internal-port-id;
-                    uses internal-port-floating-ip-port-association-fields;
-                }
-            }
-        }
     }
 
-}
\ No newline at end of file
+}