コード例 #1
0
ファイル: objmodel.py プロジェクト: Tlaskey/netplugin
def deletePolicy(tenantName, policyName):
    print "Deleting policy {0}:{1}".format(tenantName, policyName)

    # Delete Policy
    deleteUrl = 'http://localhost:9999/api/policys/' + tenantName + ':' + policyName + '/'
    response = http.httpDelete(deleteUrl)

    if response == "Error":
        errorExit("Policy create failure")
コード例 #2
0
ファイル: objmodel.py プロジェクト: zyliu404/netplugin
def deletePolicy(tenantName, policyName):
    print "Deleting policy {0}:{1}".format(tenantName, policyName)

    # Delete Policy
    deleteUrl = 'http://localhost:9999/api/policys/' + tenantName + ':' + policyName + '/'
    response = http.httpDelete(deleteUrl)

    if response == "Error":
        errorExit("Policy create failure")
コード例 #3
0
ファイル: objmodel.py プロジェクト: Tlaskey/netplugin
def deleteTenant(tenantName):
    print "Deleting tenant {0}".format(tenantName)

    # Delete tenant
    deleteUrl = 'http://localhost:9999/api/tenants/' + tenantName + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("Tenant delete failure")
コード例 #4
0
ファイル: objmodel.py プロジェクト: Tlaskey/netplugin
def deleteNet(tenantName, networkName):
    print "Deleting network {0}:{1}".format(tenantName, networkName)

    # Delete network
    deleteUrl = 'http://localhost:9999/api/networks/' + tenantName + ':' + networkName + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("Network delete failure")
コード例 #5
0
ファイル: objmodel.py プロジェクト: Tlaskey/netplugin
def deleteEpg(tenantName, networkName, groupName):
    print "Deleting endpoint group {0}:{1}:{2}".format(tenantName, networkName, groupName)

    # Delete EPG
    deleteUrl = 'http://localhost:9999/api/endpointGroups/' + tenantName + ':' + networkName + ':' + groupName + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("Epg delete failure")
コード例 #6
0
ファイル: objmodel.py プロジェクト: Tlaskey/netplugin
def deleteRule(tenantName, policyName, ruleId):
    print "Deleting rule {0}:{1}:{2}".format(tenantName, policyName, ruleId)

    # Delete Rule
    deleteUrl = 'http://localhost:9999/api/rules/' + tenantName + ':' + policyName + ':' + ruleId + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("rule delete failure")
コード例 #7
0
ファイル: objmodel.py プロジェクト: zyliu404/netplugin
def deleteTenant(tenantName):
    print "Deleting tenant {0}".format(tenantName)

    # Delete tenant
    deleteUrl = 'http://localhost:9999/api/tenants/' + tenantName + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("Tenant delete failure")
コード例 #8
0
ファイル: objmodel.py プロジェクト: zyliu404/netplugin
def deleteNet(tenantName, networkName):
    print "Deleting network {0}:{1}".format(tenantName, networkName)

    # Delete network
    deleteUrl = 'http://localhost:9999/api/networks/' + tenantName + ':' + networkName + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("Network delete failure")
コード例 #9
0
ファイル: objmodel.py プロジェクト: zyliu404/netplugin
def deleteRule(tenantName, policyName, ruleId):
    print "Deleting rule {0}:{1}:{2}".format(tenantName, policyName, ruleId)

    # Delete Rule
    deleteUrl = 'http://localhost:9999/api/rules/' + tenantName + ':' + policyName + ':' + ruleId + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("rule delete failure")
コード例 #10
0
ファイル: objmodel.py プロジェクト: zyliu404/netplugin
def deleteEpg(tenantName, networkName, groupName):
    print "Deleting endpoint group {0}:{1}:{2}".format(tenantName, networkName,
                                                       groupName)

    # Delete EPG
    deleteUrl = 'http://localhost:9999/api/endpointGroups/' + tenantName + ':' + networkName + ':' + groupName + '/'
    response = http.httpDelete(deleteUrl)

    # Check for error
    if response == "Error":
        errorExit("Epg delete failure")