Exemple #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)
Exemple #2
0
def AddApps(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='App'), node_names,
                             device_names)
Exemple #3
0
def DeleteApps(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='App'), node_names,
                               device_names)
Exemple #4
0
def DeleteSgPolicies(node_names=None, device_names=None):
    return DeleteConfigObjects(
        cfg_api.QueryConfigs(kind='NetworkSecurityPolicy'), node_names,
        device_names)
Exemple #5
0
def DeleteSecurityProfiles(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='SecurityProfile'),
                               node_names, device_names)
Exemple #6
0
def AddEndpoints(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='Endpoint'), node_names,
                             device_names)
Exemple #7
0
def DeleteEndpoints(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='Endpoint'),
                               node_names, device_names)
Exemple #8
0
def DeleteNetworks(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='Network'),
                               node_names, device_names)
Exemple #9
0
def AddNetworks(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='Network'), node_names,
                             device_names)
Exemple #10
0
def DeleteMirrors(node_names=None, device_names=None):
    return DeleteConfigObjects(cfg_api.QueryConfigs(kind='MirrorSession'),
                               node_names, device_names)
Exemple #11
0
def AddMirrors(node_names=None, device_names=None):
    return PushConfigObjects(cfg_api.QueryConfigs(kind='MirrorSession'),
                             node_names, device_names)
Exemple #12
0
def QueryConfigs(kind, filter=None):
    return cfg_api.QueryConfigs(kind, filter)