Forum Discussion
Zdenek
Cirrostratus
Dec 16, 2023F5OS API - not able to create vlan
Hi all, GET request: https://10.10.10.10/api/data/openconfig-vlan:vlans Gives me JSON payload as here: {
"openconfig-vlan:vlans": {
"vlan": [
{
"vlan...
- Feb 15, 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
Raam
Employee
Feb 15, 2024Try 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]
}
}
}
}
]
}
EOFZdenek
Cirrostratus
Feb 21, 2024Yes that is the correct, it has to be done through interface API endpoint, Thanks Raam.
I just wonder what's the reason to have such complicated key names like "openconfig-vlan:switched-vlan", I don't see any benefits in that..
- michal-kNov 09, 2024
Altostratus
Just ran into it earlier today. Netconf/yang is painful..
I think the fact the "members" container is not writable is either a bug, or the documentation needs a serious overhaul.
I will open a case for that..
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects