cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
254
Views
0
Helpful
2
Replies

Cisco FMC FTD Device Configuration Question

jonathon.graham
Level 1
Level 1

Hello,

I'm trying to configure a Cisco FMC using ansible. What I'm trying to do is configure FTD interfaces via the API. I have been on the CiscoGit for ansible and below is the example configuration. I'm the only thing I've really changed is the interface IPs and names. I'm not sure if I'm interrupting the error correctly. I thought it was somehow the name. However, the same error is presented no matter what I change. Any help would be great.

When I run the code I get the following:

fatal: [10.100.100.100]: FAILED! => {"changed": false, "msg": "Server returned an error trying to execute updateFTDPhysicalInterface operation. Status code: 400. Server response: Hardware Name cannot be changed for the Physical interface."}

Example code being used:

- name: Setup Outside Interface with static IP
cisco.fmcansible.fmc_configuration:
operation: updateFTDPhysicalInterface
data:
ifname: outside
ipv4:
static:
address: "{{ outside_ip | default('192.168.10.4') }}"
netmask: "{{ outside_netmask | default('255.255.255.0') }}"
MTU: 1500
enabled: True
mode: NONE
type: physicalinterface
name: GigabitEthernet0/0
path_params:
domainUUID: '{{ domain[0].uuid }}'
containerUUID: '{{ device_list[0].id }}'
objectId: '{{ physical_interfaces[0].id }}

2 Replies 2

mfr-6
Spotlight
Spotlight

hi @jonathon.graham 

If you go to the usage docs here: https://github.com/CiscoDevNet/FMCAnsible/blob/main/docs/usage.md
you can read, that "data" corresponds to the body part in HTTP request.

Then if you go  to: https://github.com/CiscoDevNet/FMCAnsible/blob/940a47531ff9b668d72fa36440a7b7d36c8b4225/samples/docs/operations/update_ftd_physical_interface.md - you can find here parameters supported and this corresponds to the example in API Explorer for 

/api/fmc_config/v1/domain/{domainUUID}/devices/devicerecords/{containerUUID}/physicalinterfaces/{objectId}

endpoint.
Example below:

{
  "type": "PhysicalInterface",
  "enabled": false,
  "MTU": 1500,
  "name": "Ethernet1/16",
  "id": "PhyIntfId",
  "mode": "NONE",
  "hardware": {
    "speed": "TWENTY_FIVE_THOUSAND",
    "duplex": "FULL",
    "autoNegState": true,
    "fecMode": "CL108RS",
    "flowControlSend": "OFF"
  },
  "LLDP": {
    "transmit": false,
    "receive": false
  },
  "managementOnly": false,
  "nveOnly": false,
  "enableSGTPropagate": false,
  "ipv6": {
    "enableIPV6": false
  }
}

 That being said - "ifName" parameter is not supported for this operation.

Did you mean "SubInterface" maybe?
https://github.com/CiscoDevNet/FMCAnsible/blob/940a47531ff9b668d72fa36440a7b7d36c8b4225/samples/docs/operations/update_ftd_sub_interface.md

Mateusz Frak NetDevOps | DevNet | Automation
Please mark this post as helpful if it solves your issue, to make this visible for other users, thank you!

Okay, so how would I change the IP and subnet mask on the same interface?