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