- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Adding Meters to datapaths
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
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
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
08-15-2014 11:14 PM
08-15-2014 11:14 PM
Adding Meters to datapaths
Hello Experts,
Following code for adding meter is giving me invalid jason error. Could anyone spare some time in identifying the root cause?
meter_band = hp.datatypes.MeterBand(mtype = "drop", rate=10000) flags = ["kbps"] bands = [meter_band] meter = hp.datatypes.Meter(id = 1, command = "add", flags = flags, bands = bands) api.add_meter(d.dpid, meter)
#********* Error
Traceback (most recent call last):
File "rate_limit.py", line 44, in <module>
api.add_meter(d.dpid, meter)
File "C:\Python27\lib\site-packages\hpsdnclient\of.py", line 194, in add_meter
r = self.restclient.post(url, json.dumps(meter.to_dict()))
File "C:\Python27\lib\site-packages\hpsdnclient\rest.py", line 143, in post
raise_errors(r)
File "C:\Python27\lib\site-packages\hpsdnclient\error.py", line 27, in raise_errors
raise_400(response)
File "C:\Python27\lib\site-packages\hpsdnclient\error.py", line 43, in raise_400
data['message'])
hpsdnclient.error.InvalidJson: Invalid JSON format: null. Please refer to the HP VAN SDN Controller JSON
Thanks in advance
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2014 04:46 AM
08-20-2014 04:46 AM
Re: Adding Meters to datapaths
Ok. Turned out to be the hp-sdn-client python code had a bug. HP R&D folks lend a helping hand in fixing it. It was nice. I was able to create the meter on physical openflow1.3 enabled switches. The code fails when tried with virtual
Does anyone have experience in working with openflow 1.3 meters on virtual environment( mininet-openvswitch)?
Thank you
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2014 02:36 AM
09-01-2014 02:36 AM
Re: Adding Meters to datapaths
Hello Pradeep,
You can use RESTAPI POST /sdn/v2.0/of/datapaths/{dpid}/meters [REST API Doc page 57] to create meter however if you are trying the same with some code[python] , please share the code/error/screen shot in case you are facing some problem.
Thanks,
HP SDN Team