Forum Discussion
F5OS API - not able to create vlan
- Feb 16, 2024
Try the following;
curl -k -X PATCH -H'Content-Type: application/yang-data+json' -u admin:admin "https://192.168.10.11/api/data/openconfig-interfaces:interfaces/interface" --data @- <<EOF { "interface": [ { "name": "6.0", "openconfig-if-ethernet:ethernet": { "openconfig-vlan:switched-vlan": { "config": { "trunk-vlans": [940] } } } } ] } EOF
Try removing the 'members' portion from the body and see if that works.
{
"openconfig-vlan:vlans": {
"vlan": [
{
"vlan-id": 405,
"config": {
"vlan-id": 405,
"name": "v405_10.10.20.0_m29"
}
}
]
}
}
Tried and it works yes, but then the vlan is not attached to the interface and I can't find any way how to do it. F5 support doing own research as well, still..
- coddiggerFeb 06, 2024
Employee
The official API doc for adding members is here: https://clouddocs.f5.com/api/rseries-api/F5OS-A-1.5.0-api.html?section=openconfig-vlan#operation/data_openconfig_vlan_vlans_vlan_vlan_vlan_id_members_patch.
I have not tested it, though ...
- ZdenekFeb 06, 2024
Cirrostratus
Hmm, I missed this one. I have used this documentation - Initial Setup of the rSeries Network Layer (f5.com) which is just ignoring vlan<>interface bundling. I will give it a try and let you know. Thanks for help👍
- ZdenekFeb 06, 2024
Cirrostratus
So I tried and failed.
PATCH https://10.10.10.10/api/data/openconfig-vlan:vlans/vlan=30/members{"openconfig-vlan:members": {
"member": [
{
"state":
{
"interface": "Production_trunk"
}
}
]
}
}But it gives me 400 as a response code with such strange error code:
{
"ietf-restconf:errors": {
"error": [
{
"error-type": "application",
"error-tag": "malformed-message",
"error-path": "/openconfig-vlan:vlans/vlan[vlan-id='30']/members",
"error-message": "object is not writable: /oc-vlan:vlans/oc-vlan:vlan[oc-vlan:vlan-id='30']/oc-vlan:members/oc-vlan:member"
}
]
}
}the vlan 30 exists, the trunk exists as well
- coddiggerFeb 06, 2024
Employee
The "members" part seems broken. Or at least the documentation on it ...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com