예제 #1
0
def registerEndpointLocation_multifabric_mn(desc):

  nodeId1 = util.getOvsdbNodeIdByName("sw11")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId2 = util.getOvsdbNodeIdByName("sw12")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId3 = util.getOvsdbNodeIdByName("sw13")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId4 = util.getOvsdbNodeIdByName("sw21")
  if nodeId4 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId5 = util.getOvsdbNodeIdByName("sw2")
  if nodeId5 == constants.ERROR_STR:
    return constants.ERROR_STR

  for inputData in tenant_3EPG_multifabric_mn.get_endpoint_location_data(nodeId1, nodeId2, nodeId3, nodeId4, nodeId5):
    result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(), json.dumps(inputData), sys._getframe().f_code.co_name)

  return result
예제 #2
0
파일: testCases.py 프로젝트: jansci621/faas
def registerEndpointLocation_multifabric_mn(desc):

    nodeId1 = util.getOvsdbNodeIdByName("sw11")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId2 = util.getOvsdbNodeIdByName("sw12")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId3 = util.getOvsdbNodeIdByName("sw13")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId4 = util.getOvsdbNodeIdByName("sw21")
    if nodeId4 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId5 = util.getOvsdbNodeIdByName("sw2")
    if nodeId5 == constants.ERROR_STR:
        return constants.ERROR_STR

    for inputData in tenant_3EPG_multifabric_mn.get_endpoint_location_data(
            nodeId1, nodeId2, nodeId3, nodeId4, nodeId5):
        result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(),
                                     json.dumps(inputData),
                                     sys._getframe().f_code.co_name)

    return result
예제 #3
0
def registerEndpointLocation_multifabric(desc):
  nc_id1a = "vethl-h35-2"
  nc_id1b = "vethl-h35-3"
  nc_id2a = "vethl-h36-4"
  nc_id2b = "vethl-h36-5"
  nc_id3a = "vethl-h37-2"
  nc_id3b = "vethl-h37-3"
  nc_id4a = "vethl-h35-8"
  nc_id4b = "vethl-h36-8"
  nc_id4c = "vethl-h37-8"

  nodeId1 = util.getOvsdbNodeIdByName("sw11")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId2 = util.getOvsdbNodeIdByName("sw12")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId3 = util.getOvsdbNodeIdByName("sw13")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId4 = util.getOvsdbNodeIdByName("sw21")
  if nodeId4 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId5 = util.getOvsdbNodeIdByName("sw2")
  if nodeId5 == constants.ERROR_STR:
    return constants.ERROR_STR

  for inputData in tenant_3EPG_multifabric.get_endpoint_location_data(nc_id1a, nc_id1b, nc_id2a, nc_id2b, nc_id3a, nc_id3b, nc_id4a, nc_id4b, nc_id4c,nodeId1, nodeId2, nodeId3, nodeId4, nodeId5):
    result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(), json.dumps(inputData), sys._getframe().f_code.co_name)

  return result
예제 #4
0
파일: testCases.py 프로젝트: jansci621/faas
def registerEndpointLocation_3epg_sfc_acl(desc):
    nc_id1a = "vethl-h35-2"
    nc_id1b = "vethl-h35-3"
    nc_id2a = "vethl-h36-4"
    nc_id2b = "vethl-h36-5"
    nc_id3a = "vethl-h37-2"
    nc_id3b = "vethl-h37-3"

    nodeId1 = util.getOvsdbNodeIdByName("sw1")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId2 = util.getOvsdbNodeIdByName("sw6")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId3 = util.getOvsdbNodeIdByName("sw7")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    for inputData in tenant_3EPG_demo.get_endpoint_location_data(
            nc_id1a, nc_id1b, nc_id2a, nc_id2b, nc_id3a, nc_id3b, nodeId1,
            nodeId2, nodeId3):
        result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(),
                                     json.dumps(inputData),
                                     sys._getframe().f_code.co_name)

    return result
예제 #5
0
def registerEndpointLocation_sfc(desc):
  nc_id1 = "vethl-h35-2"
  nc_id2 = "vethl-h36-4"
  nodeId1 = util.getOvsdbNodeIdByName("sw1")

  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId2 = util.getOvsdbNodeIdByName("sw6")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  for inputData in tenant_2EPG_SFC.get_endpoint_location_data(nc_id1, nc_id2, nodeId1, nodeId2):
    result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(), json.dumps(inputData), sys._getframe().f_code.co_name)

  return result
예제 #6
0
def registerEndpointLocation_acl(desc):
  nc_id1 = "sw1-eth1"
  nc_id2 = "sw2-eth3"
  nodeId1 = util.getOvsdbNodeIdByName("sw1")

  if nodeId1 == constants.ERROR_STR: 
    return constants.ERROR_STR

  nodeId2 = util.getOvsdbNodeIdByName("sw2")
  if nodeId1 == constants.ERROR_STR: 
    return constants.ERROR_STR

  for inputData in inputsGBP.get_endpoint_location_data(nc_id1, nc_id2, nodeId1, nodeId2):
    result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(), json.dumps(inputData), sys._getframe().f_code.co_name) 

  return result
예제 #7
0
파일: testCases.py 프로젝트: jansci621/faas
def registerEndpointLocation_sfc(desc):
    nc_id1 = "vethl-h35-2"
    nc_id2 = "vethl-h36-4"
    nodeId1 = util.getOvsdbNodeIdByName("sw1")

    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId2 = util.getOvsdbNodeIdByName("sw6")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    for inputData in tenant_2EPG_SFC.get_endpoint_location_data(
            nc_id1, nc_id2, nodeId1, nodeId2):
        result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(),
                                     json.dumps(inputData),
                                     sys._getframe().f_code.co_name)

    return result
예제 #8
0
파일: testCases.py 프로젝트: jansci621/faas
def registerEndpointLocation_acl(desc):
    nc_id1 = "sw1-eth1"
    nc_id2 = "sw2-eth3"
    nodeId1 = util.getOvsdbNodeIdByName("sw1")

    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId2 = util.getOvsdbNodeIdByName("sw2")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    for inputData in inputsGBP.get_endpoint_location_data(
            nc_id1, nc_id2, nodeId1, nodeId2):
        result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(),
                                     json.dumps(inputData),
                                     sys._getframe().f_code.co_name)

    return result
예제 #9
0
파일: testCases.py 프로젝트: jansci621/faas
def registerEndpointLocation_multifabric(desc):
    nc_id1a = "vethl-h35-2"
    nc_id1b = "vethl-h35-3"
    nc_id2a = "vethl-h36-4"
    nc_id2b = "vethl-h36-5"
    nc_id3a = "vethl-h37-2"
    nc_id3b = "vethl-h37-3"
    nc_id4a = "vethl-h35-8"
    nc_id4b = "vethl-h36-8"
    nc_id4c = "vethl-h37-8"

    nodeId1 = util.getOvsdbNodeIdByName("sw11")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId2 = util.getOvsdbNodeIdByName("sw12")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId3 = util.getOvsdbNodeIdByName("sw13")
    if nodeId1 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId4 = util.getOvsdbNodeIdByName("sw21")
    if nodeId4 == constants.ERROR_STR:
        return constants.ERROR_STR

    nodeId5 = util.getOvsdbNodeIdByName("sw2")
    if nodeId5 == constants.ERROR_STR:
        return constants.ERROR_STR

    for inputData in tenant_3EPG_multifabric.get_endpoint_location_data(
            nc_id1a, nc_id1b, nc_id2a, nc_id2b, nc_id3a, nc_id3b, nc_id4a,
            nc_id4b, nc_id4c, nodeId1, nodeId2, nodeId3, nodeId4, nodeId5):
        result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(),
                                     json.dumps(inputData),
                                     sys._getframe().f_code.co_name)

    return result
예제 #10
0
def registerEndpointLocation_3epg_sfc_acl(desc):
  nc_id1a = "vethl-h35-2"
  nc_id1b = "vethl-h35-3"
  nc_id2a = "vethl-h36-4"
  nc_id2b = "vethl-h36-5"
  nc_id3a = "vethl-h37-2"
  nc_id3b = "vethl-h37-3"

  nodeId1 = util.getOvsdbNodeIdByName("sw1")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId2 = util.getOvsdbNodeIdByName("sw6")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  nodeId3 = util.getOvsdbNodeIdByName("sw7")
  if nodeId1 == constants.ERROR_STR:
    return constants.ERROR_STR

  for inputData in tenant_3EPG_demo.get_endpoint_location_data(nc_id1a, nc_id1b, nc_id2a, nc_id2b, nc_id3a, nc_id3b, nodeId1, nodeId2, nodeId3):
    result = util.runRequestPOST(inputsGBP.get_endpoint_location_uri(), json.dumps(inputData), sys._getframe().f_code.co_name)

  return result
예제 #11
0
           tenant_3EPG_multifabric.get_endpoint_data(inputsCommon.tenant1Id_gc),
           'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'),
#  'vc0451': (post_data_array_c, 
#           inputsGBP.get_l3prefix_endpoint_uri(), 
#           tenant_3EPG_multifabric.get_l3prefix_endpoint_data(inputsCommon.tenant1Id_gc),
#           'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'),
  'vc046': (post_data_array_c, 
           inputsGBP.get_endpoint_uri(), 
           tenant_3EPG_multifabric_mn.get_endpoint_data(inputsCommon.tenant1Id_gc),
           'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'),
  'vc0461': (post_data_array_c, 
           inputsGBP.get_l3prefix_endpoint_uri(), 
           tenant_3EPG_multifabric_mn.get_l3prefix_endpoint_data(inputsCommon.tenant1Id_gc),
           'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'),
  'vc051': (post_data_array_c, 
           inputsGBP.get_endpoint_location_uri(),
           inputsGBP.get_endpoint_location_data_old(),
           'Register endpoint locations for Layer 3 ULN with ACL in sanity environment (i.e., no ovs running)'),
  'vc06': (post_c, 
           inputsGBP.get_unreg_endpoint_uri(), 
           inputsGBP.get_unreg_endpoint_data_layer3(),
           'Unregister endpoints on Layer 3 ULN'),
  'vc07': (delete_c, 
           inputsGBP.get_tenant_uri(inputsCommon.tenant1Id_gc), 
           'unused param',
           'Delete tenant of Layer 3 ULN'),
  'p2': (get_c, 
          inputsGBP.getLogicalNetworksUri_gc, 
          'unused param',
          'Get the logical network entities for all tenants on the uln-mapper side'),
  'p3': (get_c, 
예제 #12
0
파일: testCases.py 프로젝트: jansci621/faas
 #           inputsGBP.get_l3prefix_endpoint_uri(),
 #           tenant_3EPG_multifabric.get_l3prefix_endpoint_data(inputsCommon.tenant1Id_gc),
 #           'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'),
 'vc046':
 (post_data_array_c, inputsGBP.get_endpoint_uri(),
  tenant_3EPG_multifabric_mn.get_endpoint_data(inputsCommon.tenant1Id_gc),
  'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'
  ),
 'vc0461':
 (post_data_array_c, inputsGBP.get_l3prefix_endpoint_uri(),
  tenant_3EPG_multifabric_mn.get_l3prefix_endpoint_data(
      inputsCommon.tenant1Id_gc),
  'Register 9 endpoints for 3EPG-Layer3-ULN with SFC and ACL on multi-fabric'
  ),
 'vc051':
 (post_data_array_c, inputsGBP.get_endpoint_location_uri(),
  inputsGBP.get_endpoint_location_data_old(),
  'Register endpoint locations for Layer 3 ULN with ACL in sanity environment (i.e., no ovs running)'
  ),
 'vc06': (post_c, inputsGBP.get_unreg_endpoint_uri(),
          inputsGBP.get_unreg_endpoint_data_layer3(),
          'Unregister endpoints on Layer 3 ULN'),
 'vc07': (delete_c, inputsGBP.get_tenant_uri(inputsCommon.tenant1Id_gc),
          'unused param', 'Delete tenant of Layer 3 ULN'),
 'p2':
 (get_c, inputsGBP.getLogicalNetworksUri_gc, 'unused param',
  'Get the logical network entities for all tenants on the uln-mapper side'
  ),
 'p3': (get_c, inputsGBP.getUlnUri_gc, 'unused param',
        'Get ULN on the GBP Faas renderer side'),
 'p4': (get_c, inputsGBP.getMappedEntities_gc, 'unused param',