Commit bcb16795 authored by Javier Velázquez's avatar Javier Velázquez
Browse files

Clean code

parent ed7cc17f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ with open(os.path.join(SRC_PATH, 'IPs.json')) as f:
TEMPLATES_PATH = os.path.join(SRC_PATH, "templates")

# Dump templates
DUMP_TEMPLATES = True
DUMP_TEMPLATES = False

# Mapper 

+1 −14623

File changed.

Preview size limit exceeded, changes collapsed.

+0 −187
Original line number Diff line number Diff line
{
  "NetworkSlice1": {
    "operationalState": "",
    "administrativeState": "",
    "serviceProfileList": [],
    "networkSliceSubnetRef": "TopSliceSubnet1"
  },
  "TopSliceSubnet1": {
    "operationalState": "",
    "administrativeState": "",
    "nsInfo": {},
    "managedFunctionRef": [],
    "networkSliceSubnetType": "TOP_SLICESUBNET",
    "SliceProfileList": [
      {
        "sliceProfileId": "TopId",
        "pLMNInfoList": null,
        "TopSliceSubnetProfile": {
          "dLThptPerSliceSubnet": {
            "GuaThpt": 200,
            "MaxThpt": 400
          },
          "uLThptPerSliceSubnet": {
            "GuaThpt": 200,
            "MaxThpt": 400
          },
          "dLLatency": 20,
          "uLLatency": 20
        }
      }
    ],
    "networkSliceSubnetRef": [
      "CNSliceSubnet1",
      "RANSliceSubnet1"
    ]
  },
  "CNSliceSubnet1": {
    "operationalState": "",
    "administrativeState": "",
    "nsInfo": {},
    "managedFunctionRef": [],
    "networkSliceSubnetType": "CN_SLICESUBNET",
    "SliceProfileList": [
      {
        "sliceProfileId": "CNId",
        "pLMNInfoList": null,
        "CNSliceSubnetProfile": {
          "dLThptPerSliceSubnet": {
            "GuaThpt": 100,
            "MaxThpt": 200
          },
          "uLThptPerSliceSubnet": {
            "GuaThpt": 100,
            "MaxThpt": 200
          },
          "dLLatency": 8,
          "uLLatency": 8
        }
      }
    ]
  },
  "RANSliceSubnet1": {
    "operationalState": "",
    "administrativeState": "",
    "nsInfo": {},
    "managedFunctionRef": [],
    "networkSliceSubnetType": "RAN_SLICESUBNET",
    "SliceProfileList": [
      {
        "sliceProfileId": "RANId",
        "pLMNInfoList": null,
        "RANSliceSubnetProfile": {
          "dLThptPerSliceSubnet": {
            "GuaThpt": 100,
            "MaxThpt": 200
          },
          "uLThptPerSliceSubnet": {
            "GuaThpt": 100,
            "MaxThpt": 200
          },
          "dLLatency": 12,
          "uLLatency": 12
        }
      }
    ],
    "networkSliceSubnetRef": [
      "MidhaulSliceSubnet1",
      "BackhaulSliceSubnet1"
    ]
  },
  "MidhaulSliceSubnet1": {
    "operationalState": "",
    "administrativeState": "",
    "nsInfo": {},
    "managedFunctionRef": [],
    "networkSliceSubnetType": "RAN_SLICESUBNET",
    "SliceProfileList": [
      {
        "sliceProfileId": "MidhaulId",
        "pLMNInfoList": null,
        "RANSliceSubnetProfile": {
          "dLThptPerSliceSubnet": {
            "GuaThpt": 60,
            "MaxThpt": 120
          },
          "uLThptPerSliceSubnet": {
            "GuaThpt": 60,
            "MaxThpt": 120
          },
          "dLLatency": 4,
          "uLLatency": 4
        }
      }
    ],
    "EpTransport": [
      "EpTransport CU-UP1",
      "EpTransport DU3"
    ]
  },
  "BackhaulSliceSubnet1": {
    "operationalState": "",
    "administrativeState": "",
    "nsInfo": {},
    "managedFunctionRef": [],
    "networkSliceSubnetType": "RAN_SLICESUBNET",
    "SliceProfileList": [
      {
        "sliceProfileId": "BackhaulId",
        "pLMNInfoList": null,
        "RANSliceSubnetProfile": {
          "dLThptPerSliceSubnet": {
            "GuaThpt": 40,
            "MaxThpt": 80
          },
          "uLThptPerSliceSubnet": {
            "GuaThpt": 40,
            "MaxThpt": 80
          },
          "dLLatency": 8,
          "uLLatency": 8
        }
      }
    ],
    "EpTransport": [
      "EpTransport CU-UP2",
      "EpTransport UPF"
    ]
  },
  "EpTransport CU-UP1": {
    "IpAddress": "100.1.1.1",
    "logicalInterfaceInfo": {
      "logicalInterfaceType": "VLAN",
      "logicalInterfaceId": "300"
    },
    "NextHopInfo": "100.1.1.254",
    "qosProfile": "5QI100",
    "EpApplicationRef": [
      "EP_F1U CU-UP1"
    ]
  },
  "EP_F1U CU-UP1": {
    "localAddress": "100.1.1.2",
    "remoteAddress": "1.1.3.2",
    "epTransportRef": [
      "EpTransport CU-UP1"
    ]
  },
  "EpTransport DU3": {
    "IpAddress": "1.1.3.1",
    "logicalInterfaceInfo": {
      "logicalInterfaceType": "VLAN",
      "logicalInterfaceId": "300"
    },
    "NextHopInfo": "1.1.3.254",
    "qosProfile": "5QI100",
    "EpApplicationRef": [
      "EP_F1U DU3"
    ]
  },
  "EP_F1U DU3": {
    "localAddress": "1.1.3.2",
    "remoteAddress": "100.1.1.2",
    "epTransportRef": [
      "EpTransport DU3"
    ]
  }
}
 No newline at end of file
+0 −182
Original line number Diff line number Diff line
{
   "NetworkSlice1":{
      "operationalState":"",
      "administrativeState":"",
      "serviceProfileList":[ // Requisitos generales de una NetworkSlice. Lo suponemos vacío. The attributes in ServiceProfile represent mapped requirements from an Network Slice Customer (e.g. an enterprise) to an Network Slice Provider
         //{
         //   "serviceProfileId":"",
         //   "pLMNInfoList": null, //It defines which PLMN and S-NSSAI combinations that are assigned for the service to satisfy service requirements represented by the ServiceProfile
         //   "sST":"2" // 1 (eMBB), 2(URLLC), 3(MIoT), 4(V2X) o 5(HMTC)
         //}
      ],
      "networkSliceSubnetRef":"TopSliceSubnet1" //Es un DN (string)
   },
   "TopSliceSubnet1":{
      "operationalState":"",
      "administrativeState":"",
      "nsInfo":{}, // Se usa si la slice está en un entorno virtualizado
      "managedFunctionRef":[], // ??? Es un DNList (array de strings)
      "networkSliceSubnetType":"TOP_SLICESUBNET",
      "SliceProfileList":[ // Requisitos de una NetworkSliceSubnet, la cual representa un conjunto de funciones de red agrupadas.
         {
            "sliceProfileId":"TopId",
            "pLMNInfoList":null,
            "TopSliceSubnetProfile":{ //Condition: It shall be present when the slice profile is for top/root network slice subnet 
               "dLThptPerSliceSubnet":{ //kbps
                  "GuaThpt":1000,
                  "MaxThpt":2000
               },
               "uLThptPerSliceSubnet":{
                  "GuaThpt":1000,
                  "MaxThpt":2000
               },
               "dLLatency":5, //ms
               "uLLatency":5
            }
         }
      ],
      "networkSliceSubnetRef":["CNSliceSubnet1","RANSliceSubnet1"]
   },
   "CNSliceSubnet1":{
      "operationalState":"",
      "administrativeState":"",
      "nsInfo":{}, // Se usa si la slice está en un entorno virtualizado
      "managedFunctionRef":[], // ??? Es un DNList (array de strings)
      "networkSliceSubnetType":"CN_SLICESUBNET",
      "SliceProfileList":[ // Requisitos de una NetworkSliceSubnet, la cual representa un conjunto de funciones de red agrupadas. Los requisitos de transporte se representan aquí
         {
            "sliceProfileId":"CNId",
            "pLMNInfoList":null,
            "CNSliceSubnetProfile":{
               "dLThptPerSliceSubnet":{
                  "GuaThpt":500,
                  "MaxThpt":1000
               },
               "uLThptPerSliceSubnet":{
                  "GuaThpt":500,
                  "MaxThpt":1000
               },
               "dLLatency":2,
               "uLLatency":2
            }
         }
      ]
   },
   "RANSliceSubnet1":{
      "operationalState":"",
      "administrativeState":"",
      "nsInfo":{}, // Se usa si la slice está en un entorno virtualizado
      "managedFunctionRef":[], // ??? Es un DNList (array de strings)
      "networkSliceSubnetType":"RAN_SLICESUBNET",
      "SliceProfileList":[ // Requisitos de una NetworkSliceSubnet, la cual representa un conjunto de funciones de red agrupadas. Los requisitos de transporte se representan aquí
         {
            "sliceProfileId":"RANId",
            "pLMNInfoList":null,
            "RANSliceSubnetProfile":{
               "dLThptPerSliceSubnet":{
                  "GuaThpt":500,
                  "MaxThpt":1000
               },
               "uLThptPerSliceSubnet":{
                  "GuaThpt":500,
                  "MaxThpt":1000
               },
               "dLLatency":3,
               "uLLatency":3
            }
         }
      ],
      "networkSliceSubnetRef":["MidhaulSliceSubnet1", "BackhaulSliceSubnet1"]
   },
   "MidhaulSliceSubnet1":{
      "operationalState":"",
      "administrativeState":"",
      "nsInfo":{}, // Se usa si la slice está en un entorno virtualizado
      "managedFunctionRef":[], // ??? Es un DNList (array de strings),
      "networkSliceSubnetType":"RAN_SLICESUBNET",
      "SliceProfileList":[ // Requisitos de una NetworkSliceSubnet, la cual representa un conjunto de funciones de red agrupadas. Los requisitos de transporte se representan aquí
         {
            "sliceProfileId":"MidhaulId",
            "pLMNInfoList":null,
            "RANSliceSubnetProfile":{
               "dLThptPerSliceSubnet":{
                  "GuaThpt":300,
                  "MaxThpt":600
               },
               "uLThptPerSliceSubnet":{
                  "GuaThpt":300,
                  "MaxThpt":600
               },
               "dLLatency":1,
               "uLLatency":1
            }
         }
      ],
      "EpTransport":["EpTransport DU1","EpTransport CU-UP1"] // Es un DNList (array de strings)
   },
   "BackhaulSliceSubnet1":{
      "operationalState":"",
      "administrativeState":"",
      "nsInfo":{}, // Se usa si la slice está en un entorno virtualizado
      "managedFunctionRef":[], // ??? Es un DNList (array de strings),
      "networkSliceSubnetType":"RAN_SLICESUBNET",
      "SliceProfileList":[ // Requisitos de una NetworkSliceSubnet, la cual representa un conjunto de funciones de red agrupadas. Los requisitos de transporte se representan aquí
         {
            "sliceProfileId":"BackhaulId",
            "pLMNInfoList":null,
            "RANSliceSubnetProfile":{
               "dLThptPerSliceSubnet":{
                  "GuaThpt":200,
                  "MaxThpt":400
               },
               "uLThptPerSliceSubnet":{
                  "GuaThpt":200,
                  "MaxThpt":400
               },
               "dLLatency":2,
               "uLLatency":2
            }
         }
      ],
      "EpTransport":["EpTransport CU-UP2","EpTransport UPF"] // Es un DNList (array de strings) 
   },
   "EpTransport DU1":
      {
         "IpAddress":"100.1.1.1",
         "logicalInterfaceInfo":{
            "logicalInterfaceType":"VLAN", //VLAN, MPLS o Segment
            "logicalInterfaceId":"100"
         },
         "NextHopInfo": "100.1.1.254",
         "qosProfile":"5QI100", //Revisar el mapeo de los requisitos de la slice con esto
         "EpApplicationRef":["EP_F1U DU1"] //Es un DNList (array de string)
      },
   "EpTransport CU-UP1":
      {
         "IpAddress":"1.1.1.1",
         "logicalInterfaceInfo":{
            "logicalInterfaceType":"VLAN", //VLAN, MPLS o Segment
            "logicalInterfaceId":"100"
         },
         "NextHopInfo": "1.1.1.254",
         "QosProfile":"5QI100",
         "EpApplicationRef":["EP_F1U CU-UP1"] //Es un DNList (array de string)
      },
   "EP_F1U DU1":[ // El 3GPP parece que aun no ha definido las interfaces entre los distinos functional splits, por lo que estos objetos no están claros. Suponemos EP_F1U para todo, que es el que se usa para la interfaz F1-U entre gNB-DU y gNB-CU
      {
         "localAddress":"100.1.1.2",
         "remoteAddress":"1.1.1.2",
         "epTransportRef":["EpTransport DU1"] //Es un DNList (array de string)
      }
   ],
   "EP_F1U CU-UP1":[ //Otras opciones son EP_N3 (interfaz N3 entre RAN y UPF) y EP_NgU (interfaz NG-U entre gNB y UPF)
      {
         "localAddress":"1.1.1.2",
         "remoteAddress":"100.1.1.2",
         "epTransportRef":["EpTransport CU-UP1"] //Es un DNList (array de string)
      }
   ]
}


+0 −95
Original line number Diff line number Diff line
{
   "services":[
      {
         "service_id":{
            "context_id":{
               "context_uuid":{
                  "uuid":"admin"
               }
            },
            "service_uuid":{
               "uuid":"l2-acl-svc-17429923732568250765476542"
            }
         },
         "service_type":2,
         "service_status":{
            "service_status":1
         },
         "service_endpoint_ids":[
            {
               "device_id":{
                  "device_uuid":{
                     "uuid":"1.1.1.1"
                  }
               },
               "endpoint_uuid":{
                  "uuid":"eth0"
               }
            },
            {
               "device_id":{
                  "device_uuid":{
                     "uuid":"3.3.3.3"
                  }
               },
               "endpoint_uuid":{
                  "uuid":"eth0"
               }
            }
         ],
         "service_constraints":[
            {
               "custom":{
                  "constraint_type":"bandwidth[kbps]",
                  "constraint_value":"20"
               }
            },
            {
               "custom":{
                  "constraint_type":"latency[ms]",
                  "constraint_value":"20"
               }
            }
         ],
         "service_config":{
            "config_rules":[
               {
                  "action":1,
                  "custom":{
                     "resource_key":"/settings",
                     "resource_value":{
                        
                     }
                  }
               },
               {
                  "action":1,
                  "custom":{
                     "resource_key":"/device[1.1.1.1]/endpoint[eth0]/settings",
                     "resource_value":{
                        "sub_interface_index":0,
                        "vlan_id":100,
                        "circuit_id":"100",
                        "remote_router":"3.3.3.3",
                        "ni_name":"ELAN100"
                     }
                  }
               },
               {
                  "action":1,
                  "custom":{
                     "resource_key":"/device[3.3.3.3]/endpoint[eth0]/settings",
                     "resource_value":{
                        "sub_interface_index":0,
                        "vlan_id":100,
                        "circuit_id":"100",
                        "remote_router":"1.1.1.1",
                        "ni_name":"ELAN100"
                     }
                  }
               }
            ]
         }
      }
   ]
}
 No newline at end of file
Loading