- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- How to create a MULTIPART_REQUEST of type AGGREGAT...
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
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
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
тАО09-20-2016 11:47 AM
тАО09-20-2016 11:47 AM
How to create a MULTIPART_REQUEST of type AGGREGATE?
Hi, I'd like to know how to create a Multipart Request message of type Aggregate (OF 1.3 spec page 64). In particular, I want to aggregate the statistics of flows that match on cookie and a cookie mask. I can see a lot of classes implementing the interface MultipartBody but none of them is for the type Aggregate ( representing "ofp_aggregate_stats_request" in the spec).
The closest one is MbodyMutableFlowStatsRequest, but after the OF message is sent, the response will include an array multiple flows rather than the aggregated counters with no array.
I'd like to know whether that's a design decision for HP VAN and I should do the aggregation manually in my module's Manager, or I am missing something to create these type of requests.
Thank you!
Code I am using:
MBodyMutableFlowStatsRequest flow_stats = new MBodyMutableFlowStatsRequest(PV); flow_stats.cookie(cookie) .cookieMask(cookieMask) .match((Match) MatchFactory.createMatch(PV).toImmutable()); OfmMutableMultipartRequest req = (OfmMutableMultipartRequest) MessageFactory.create(PV, MessageType.MULTIPART_REQUEST);
//And one of the following lines
req.body((MultipartBody) flow_stats.toImmutable()); // Get an array back when cs.send req.type(MultipartType.AGGREGATE); // Eaises IllegalArg Exception "expected body(...) : AGGREGATE"
... MessageFuture future = cs.send(req.toImmutable(), dp); future.await(); // Blocks if (future.result().isSuccess()){ ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2016 04:32 PM
тАО09-20-2016 04:32 PM
Re: How to create a MULTIPART_REQUEST of type AGGREGATE?
Hi checho88,
Thank you for posting your sample code, it makes the issue much easier to diagnose. The quick answer is that the OFPMP_AGGREGATE message type is not something that is currently supported by the HPE VAN libraries. If it was supported, you'd use code like this:
OfmMutableMultipartRequest req = (OfmMutableMultipartRequest) MessageFactory.create(PV, MessageType.MULTIPART_REQUEST); req.type(MultipartType.AGGREGATE); MultipartBody body = MpBodyFactory.createRequestBody(PV, MultipartType.AGGREGATE); // ... fill in body contents req.body(body);
The MpBodyFactory.createRequestBody() method will throw a NotYetImplementedException to indicate that the specific multipart type (AGGREGATE) is not yet implemented. We do support all other multi-part types.
It sounds like this functionality is needed, so your only option would be to perform the aggregation in your module's manager. Are you wanting to use aggregation for coding convenience (ie: only gathering the data you need, nothing more), or do you think you'll need it for scaling efficiency (ie: gathering stats on thousands of flows)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2016 06:14 AM
тАО09-21-2016 06:14 AM
Re: How to create a MULTIPART_REQUEST of type AGGREGATE?
Hi Shaun, thank you for your quick reply.
It is a pity that is not currently supported. I would say that right now we are okay doing the aggregation in the module since we are still in dev state and the amount of flows and switches in the network is small. However, once we migrate to production, the amount of switches and flows on campus will increase subtantially (hundreds or thousands) and I am unsure doing aggregation in the module will scale. The idea is to return these aggregate counters to (possibly multiple) monitoring service(s) that constantly poll(s) our module every certain amount of time (say every second).