<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a MULTIPART_REQUEST of type AGGREGATE? in Software Defined Networking</title>
    <link>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900522#M984</link>
    <description>&lt;P&gt;Hi checho88,&lt;/P&gt;&lt;P&gt;Thank you for posting your sample code, it makes the issue much easier to diagnose. The quick answer is that the &lt;STRONG&gt;OFPMP_AGGREGATE&lt;/STRONG&gt; message type is not something that is currently supported by the HPE VAN libraries.&amp;nbsp;If it &lt;EM&gt;was&amp;nbsp;&lt;/EM&gt;supported, you'd use code like this:&lt;/P&gt;&lt;PRE&gt;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);&lt;/PRE&gt;&lt;P&gt;The &lt;STRONG&gt;MpBodyFactory.createRequestBody()&lt;/STRONG&gt; method will throw a &lt;STRONG&gt;NotYetImplementedException&lt;/STRONG&gt; to indicate that the specific multipart type (AGGREGATE) is not yet implemented. We do support all other multi-part types.&lt;/P&gt;&lt;P&gt;It sounds like this functionality is needed, so your only option would be to perform the aggregation in your module's manager.&amp;nbsp;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)?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2016 23:32:46 GMT</pubDate>
    <dc:creator>ShaunWackerly</dc:creator>
    <dc:date>2016-09-20T23:32:46Z</dc:date>
    <item>
      <title>How to create a MULTIPART_REQUEST of type AGGREGATE?</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900472#M983</link>
      <description>&lt;P&gt;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).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The closest one is MbodyMutableFlowStatsRequest, but after the OF message is sent, the response will include an array&amp;nbsp;multiple flows rather than the aggregated counters with no array.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to know whether&amp;nbsp;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Code I am using:&lt;/P&gt;&lt;PRE&gt;		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);
&lt;BR /&gt;                //And one of the following lines&lt;BR /&gt;		req.body((MultipartBody) flow_stats.toImmutable()); // Get an array back when cs.send
                req.type(MultipartType.AGGREGATE);   // Eaises IllegalArg Exception "expected body(...) : AGGREGATE"&lt;BR /&gt;                ...
		MessageFuture future = cs.send(req.toImmutable(), dp);
		future.await(); // Blocks
		if (future.result().isSuccess()){
                      ....&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 18:47:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900472#M983</guid>
      <dc:creator>checho88</dc:creator>
      <dc:date>2016-09-20T18:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a MULTIPART_REQUEST of type AGGREGATE?</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900522#M984</link>
      <description>&lt;P&gt;Hi checho88,&lt;/P&gt;&lt;P&gt;Thank you for posting your sample code, it makes the issue much easier to diagnose. The quick answer is that the &lt;STRONG&gt;OFPMP_AGGREGATE&lt;/STRONG&gt; message type is not something that is currently supported by the HPE VAN libraries.&amp;nbsp;If it &lt;EM&gt;was&amp;nbsp;&lt;/EM&gt;supported, you'd use code like this:&lt;/P&gt;&lt;PRE&gt;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);&lt;/PRE&gt;&lt;P&gt;The &lt;STRONG&gt;MpBodyFactory.createRequestBody()&lt;/STRONG&gt; method will throw a &lt;STRONG&gt;NotYetImplementedException&lt;/STRONG&gt; to indicate that the specific multipart type (AGGREGATE) is not yet implemented. We do support all other multi-part types.&lt;/P&gt;&lt;P&gt;It sounds like this functionality is needed, so your only option would be to perform the aggregation in your module's manager.&amp;nbsp;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)?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 23:32:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900522#M984</guid>
      <dc:creator>ShaunWackerly</dc:creator>
      <dc:date>2016-09-20T23:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a MULTIPART_REQUEST of type AGGREGATE?</title>
      <link>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900723#M985</link>
      <description>&lt;P&gt;Hi Shaun, thank you for your quick reply.&lt;/P&gt;&lt;P&gt;It is a pity that is not currently supported. I would say that right now we are &lt;EM&gt;okay&lt;/EM&gt;&amp;nbsp;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&amp;nbsp;constantly poll(s) our module every certain amount of time (say every second). &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 13:14:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/how-to-create-a-multipart-request-of-type-aggregate/m-p/6900723#M985</guid>
      <dc:creator>checho88</dc:creator>
      <dc:date>2016-09-21T13:14:42Z</dc:date>
    </item>
  </channel>
</rss>

