- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Re: Setting port state in REST API?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2014 09:50 AM
03-23-2014 09:50 AM
Setting port state in REST API?
looking at the documentation I can see I can enable or disable a port using /of/datapaths/{dpid}/ports/{port_id}/action and RSdoc gives a working example. Unfortunatly when you disable a port you lose the link so the topology changes. I just want to stop traffic flowing over the port. I know I could do this with a flow but setting the state would be easier.
Can anyone point me to how to set the state? From the object model i can see there are 7 possible states but i can find how to change them (see below).
"state": {
"description": "Port states",
"type": "array",
"items": {
"enum": ["link_down",
"blocked",
"live",
"stp_listen",
"stp_learn",
"stp_forward",
"stp_block"]
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2014 02:01 AM
04-29-2014 02:01 AM
Re: Setting port state in REST API?
Hello stacehip,
According to version 2.0.0 of the sdn-apidoc, PortState (com.hp.of.lib.msg) is “read-only and cannot be changed by the controller.” So it’s not possible to set a port to link_down, blocked, live, etc.
All port flags are read-only and when the port flags are changed, the switch sends a {@link MessageType#PORT_STATUS } message to notify the controller of the change.
So we cannot set the port states through the controller.
Hope this answers your query, please feel free to reply if you have any addition queries related to this topic.
Thanks,
HP SDN Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 04:13 AM
05-08-2014 04:13 AM
Re: Setting port state in REST API?
Hello stacehip,
Doing a follow up to check if you need any further assistance with respect to the query posted.
Please do let us know if your problem is solved.
If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.
Thanks
HP SDN Team