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)
def AddApps(node_names=None, device_names=None): return PushConfigObjects(cfg_api.QueryConfigs(kind='App'), node_names, device_names)
def DeleteApps(node_names=None, device_names=None): return DeleteConfigObjects(cfg_api.QueryConfigs(kind='App'), node_names, device_names)
def DeleteSgPolicies(node_names=None, device_names=None): return DeleteConfigObjects( cfg_api.QueryConfigs(kind='NetworkSecurityPolicy'), node_names, device_names)
def DeleteSecurityProfiles(node_names=None, device_names=None): return DeleteConfigObjects(cfg_api.QueryConfigs(kind='SecurityProfile'), node_names, device_names)
def AddEndpoints(node_names=None, device_names=None): return PushConfigObjects(cfg_api.QueryConfigs(kind='Endpoint'), node_names, device_names)
def DeleteEndpoints(node_names=None, device_names=None): return DeleteConfigObjects(cfg_api.QueryConfigs(kind='Endpoint'), node_names, device_names)
def DeleteNetworks(node_names=None, device_names=None): return DeleteConfigObjects(cfg_api.QueryConfigs(kind='Network'), node_names, device_names)
def AddNetworks(node_names=None, device_names=None): return PushConfigObjects(cfg_api.QueryConfigs(kind='Network'), node_names, device_names)
def DeleteMirrors(node_names=None, device_names=None): return DeleteConfigObjects(cfg_api.QueryConfigs(kind='MirrorSession'), node_names, device_names)
def AddMirrors(node_names=None, device_names=None): return PushConfigObjects(cfg_api.QueryConfigs(kind='MirrorSession'), node_names, device_names)
def QueryConfigs(kind, filter=None): return cfg_api.QueryConfigs(kind, filter)