예제 #1
0
def PortDown(node_names=None, device_names=None):
    port_objects = cfg_api.QueryConfigs(kind='Port')
    for obj in port_objects:
        obj.spec.admin_status = "UP"
    UpdateConfigObjects(port_objects, node_names, device_names)
예제 #2
0
def AddApps(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='App'), node_names,
                             device_names)
예제 #3
0
def DeleteApps(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='App'), node_names,
                               device_names)
예제 #4
0
def DeleteSgPolicies(node_names=None, device_names=None):
    return DeleteConfigObjects(
        cfg_api.QueryConfigs(kind='NetworkSecurityPolicy'), node_names,
        device_names)
예제 #5
0
def DeleteSecurityProfiles(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='SecurityProfile'),
                               node_names, device_names)
예제 #6
0
def AddEndpoints(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='Endpoint'), node_names,
                             device_names)
예제 #7
0
def DeleteEndpoints(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='Endpoint'),
                               node_names, device_names)
예제 #8
0
def DeleteNetworks(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='Network'),
                               node_names, device_names)
예제 #9
0
def AddNetworks(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='Network'), node_names,
                             device_names)
예제 #10
0
def DeleteMirrors(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='MirrorSession'),
                               node_names, device_names)
예제 #11
0
def AddMirrors(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='MirrorSession'),
                             node_names, device_names)
예제 #12
0
def QueryConfigs(kind, filter=None):
    return cfg_api.QueryConfigs(kind, filter)