Description
The addInterfacePresenceChange operation handles configuration related to InterfacePresenceChange model.
A scan of the available interfaces. It will create new interfaces. It will modify the present field on removed or returned interfaces and subinterfaces.
HTTP request
POST /api/fdm/v6/action/interfacescan
Data Parameters
| Parameter | Required | Type | Description | |||
|---|---|---|---|---|---|---|
| removedInterfaces | False | [object] | A list of removed Physical Interface and Subinterfaces that will no longer be deployed. Allowed types are: [EtherChannelInterface, PhysicalInterface, SubInterface, VirtualTunnelInterface, VlanInterface] |
|||
| newInterfaces | False | [object] | A list of newly created Physical Interfaces. Allowed types are: [EtherChannelInterface, PhysicalInterface, SubInterface, VirtualTunnelInterface, VlanInterface] |
|||
| returnedInterfaces | False | [object] | A list of previously removed interfaces that have returned to use. Allowed types are: [EtherChannelInterface, PhysicalInterface, SubInterface, VirtualTunnelInterface, VlanInterface] |
|||
| type | True | string | A UTF8 string, all letters lower-case, that represents the class-type. This corresponds to the class name. | |||
Example
curl -X POST \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"id": "string",
"newInterfaces": [],
"removedInterfaces": [],
"returnedInterfaces": [],
"type": "InterfacePresenceChange"
}' \
"https://${HOST}:${PORT}/api/fdm/v6/action/interfacescan"
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient
def get_client(host, token):
http_client = RequestsClient()
http_client.ssl_verify = False
http_client.set_api_key(
host,
"Bearer {}".format(token),
param_name="Authorization",
param_in="header"
)
return SwaggerClient.from_url(
"https://{}/apispec/ngfw.json".format(host),
http_client=http_client,
config={
"validate_responses": False,
"validate_swagger_spec": False
}
)
def add_interface_presence_change(client, body):
return client.InterfacePresenceChange.addInterfacePresenceChange(
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
body = {'newInterfaces': [],
'removedInterfaces': [],
'returnedInterfaces': [],
'type': 'InterfacePresenceChange'}
add_interface_presence_change(client, body)