blob: e89aa7d78842eeb3d810b0cab4b7578713d3b1f9 [file] [log] [blame]
Don Newton98fd8812019-09-23 15:15:02 -04001/*
2 * Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
3 * Copyright (c) 2011, 2012 Open Networking Foundation
4 * Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler.
5 * Copyright 2018, Red Hat, Inc.
6 */
7// Automatically generated by LOXI from template module.go
8// Do not modify
9
10package of13
11
12import (
13 "bytes"
14 "encoding/binary"
15 "encoding/json"
16 "fmt"
17 "net"
18
Jonathan Hart828908c2020-04-15 14:23:45 -070019 "github.com/opencord/goloxi"
Don Newton98fd8812019-09-23 15:15:02 -040020)
21
22type Action struct {
23 Type uint16
24 Len uint16
25}
26
27type IAction interface {
28 goloxi.Serializable
29 GetType() uint16
30 GetLen() uint16
31 GetActionName() string
32 GetActionFields() map[string]interface{}
33}
34
35func (self *Action) GetType() uint16 {
36 return self.Type
37}
38
39func (self *Action) SetType(v uint16) {
40 self.Type = v
41}
42
43func (self *Action) GetLen() uint16 {
44 return self.Len
45}
46
47func (self *Action) SetLen(v uint16) {
48 self.Len = v
49}
50
51func (self *Action) Serialize(encoder *goloxi.Encoder) error {
52
53 encoder.PutUint16(uint16(self.Type))
54 encoder.PutUint16(uint16(self.Len))
55
56 return nil
57}
58
59func DecodeAction(decoder *goloxi.Decoder) (goloxi.IAction, error) {
60 _action := &Action{}
61 if decoder.Length() < 4 {
62 return nil, fmt.Errorf("Action packet too short: %d < 4", decoder.Length())
63 }
64 _action.Type = uint16(decoder.ReadUint16())
65 _action.Len = uint16(decoder.ReadUint16())
66 oldDecoder := decoder
67 defer func() { decoder = oldDecoder }()
68 decoder = decoder.SliceDecoder(int(_action.Len), 2+2)
69
70 switch _action.Type {
71 case 0:
72 return DecodeActionOutput(_action, decoder)
73 case 11:
74 return DecodeActionCopyTtlOut(_action, decoder)
75 case 12:
76 return DecodeActionCopyTtlIn(_action, decoder)
77 case 15:
78 return DecodeActionSetMplsTtl(_action, decoder)
79 case 16:
80 return DecodeActionDecMplsTtl(_action, decoder)
81 case 17:
82 return DecodeActionPushVlan(_action, decoder)
83 case 18:
84 return DecodeActionPopVlan(_action, decoder)
85 case 19:
86 return DecodeActionPushMpls(_action, decoder)
87 case 20:
88 return DecodeActionPopMpls(_action, decoder)
89 case 21:
90 return DecodeActionSetQueue(_action, decoder)
91 case 22:
92 return DecodeActionGroup(_action, decoder)
93 case 23:
94 return DecodeActionSetNwTtl(_action, decoder)
95 case 24:
96 return DecodeActionDecNwTtl(_action, decoder)
97 case 25:
98 return DecodeActionSetField(_action, decoder)
99 case 26:
100 return DecodeActionPushPbb(_action, decoder)
101 case 27:
102 return DecodeActionPopPbb(_action, decoder)
103 case 65535:
104 return DecodeActionExperimenter(_action, decoder)
105 default:
106 return nil, fmt.Errorf("Invalid type '%d' for 'Action'", _action.Type)
107 }
108}
109
110func NewAction(_type uint16) *Action {
111 obj := &Action{}
112 obj.Type = _type
113 return obj
114}
115
116type ActionExperimenter struct {
117 *Action
118 Experimenter uint32
119}
120
121type IActionExperimenter interface {
122 goloxi.IAction
123 GetExperimenter() uint32
124}
125
126func (self *ActionExperimenter) GetExperimenter() uint32 {
127 return self.Experimenter
128}
129
130func (self *ActionExperimenter) SetExperimenter(v uint32) {
131 self.Experimenter = v
132}
133
134func (self *ActionExperimenter) Serialize(encoder *goloxi.Encoder) error {
135 if err := self.Action.Serialize(encoder); err != nil {
136 return err
137 }
138
139 encoder.PutUint32(uint32(self.Experimenter))
140
141 return nil
142}
143
144func DecodeActionExperimenter(parent *Action, decoder *goloxi.Decoder) (IActionExperimenter, error) {
145 _actionexperimenter := &ActionExperimenter{Action: parent}
146 if decoder.Length() < 4 {
147 return nil, fmt.Errorf("ActionExperimenter packet too short: %d < 4", decoder.Length())
148 }
149 _actionexperimenter.Experimenter = uint32(decoder.ReadUint32())
150
151 switch _actionexperimenter.Experimenter {
152 case 8992:
153 return DecodeActionNicira(_actionexperimenter, decoder)
154 case 6035143:
155 return DecodeActionBsn(_actionexperimenter, decoder)
156 default:
157 return nil, fmt.Errorf("Invalid type '%d' for 'ActionExperimenter'", _actionexperimenter.Experimenter)
158 }
159}
160
161func NewActionExperimenter(_experimenter uint32) *ActionExperimenter {
162 obj := &ActionExperimenter{
163 Action: NewAction(65535),
164 }
165 obj.Experimenter = _experimenter
166 return obj
167}
168func (self *ActionExperimenter) GetActionName() string {
169 return "experimenter"
170}
171
172func (self *ActionExperimenter) GetActionFields() map[string]interface{} {
173 return map[string]interface{}{
174 "Experimenter": self.Experimenter,
175 }
176}
177
178func (self *ActionExperimenter) MarshalJSON() ([]byte, error) {
179 jsonValue, err := json.Marshal(self.GetActionFields())
180 if err != nil {
181 return nil, err
182 }
183 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
184}
185
186type ActionBsn struct {
187 *ActionExperimenter
188 Subtype uint32
189}
190
191type IActionBsn interface {
192 IActionExperimenter
193 GetSubtype() uint32
194}
195
196func (self *ActionBsn) GetSubtype() uint32 {
197 return self.Subtype
198}
199
200func (self *ActionBsn) SetSubtype(v uint32) {
201 self.Subtype = v
202}
203
204func (self *ActionBsn) Serialize(encoder *goloxi.Encoder) error {
205 if err := self.ActionExperimenter.Serialize(encoder); err != nil {
206 return err
207 }
208
209 encoder.PutUint32(uint32(self.Subtype))
210
211 return nil
212}
213
214func DecodeActionBsn(parent *ActionExperimenter, decoder *goloxi.Decoder) (IActionBsn, error) {
215 _actionbsn := &ActionBsn{ActionExperimenter: parent}
216 if decoder.Length() < 4 {
217 return nil, fmt.Errorf("ActionBsn packet too short: %d < 4", decoder.Length())
218 }
219 _actionbsn.Subtype = uint32(decoder.ReadUint32())
220
221 switch _actionbsn.Subtype {
222 case 1:
223 return DecodeActionBsnMirror(_actionbsn, decoder)
224 case 2:
225 return DecodeActionBsnSetTunnelDst(_actionbsn, decoder)
226 case 4:
227 return DecodeActionBsnChecksum(_actionbsn, decoder)
228 case 5:
229 return DecodeActionBsnGentable(_actionbsn, decoder)
230 default:
231 return nil, fmt.Errorf("Invalid type '%d' for 'ActionBsn'", _actionbsn.Subtype)
232 }
233}
234
235func NewActionBsn(_subtype uint32) *ActionBsn {
236 obj := &ActionBsn{
237 ActionExperimenter: NewActionExperimenter(6035143),
238 }
239 obj.Subtype = _subtype
240 return obj
241}
242func (self *ActionBsn) GetActionName() string {
243 return "bsn"
244}
245
246func (self *ActionBsn) GetActionFields() map[string]interface{} {
247 return map[string]interface{}{
248 "Subtype": self.Subtype,
249 }
250}
251
252func (self *ActionBsn) MarshalJSON() ([]byte, error) {
253 jsonValue, err := json.Marshal(self.GetActionFields())
254 if err != nil {
255 return nil, err
256 }
257 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
258}
259
260type ActionBsnChecksum struct {
261 *ActionBsn
262 Checksum Checksum128
263}
264
265type IActionBsnChecksum interface {
266 IActionBsn
267 GetChecksum() Checksum128
268}
269
270func (self *ActionBsnChecksum) GetChecksum() Checksum128 {
271 return self.Checksum
272}
273
274func (self *ActionBsnChecksum) SetChecksum(v Checksum128) {
275 self.Checksum = v
276}
277
278func (self *ActionBsnChecksum) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700279 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400280 if err := self.ActionBsn.Serialize(encoder); err != nil {
281 return err
282 }
283
284 self.Checksum.Serialize(encoder)
Jonathan Hart828908c2020-04-15 14:23:45 -0700285 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400286
Jonathan Hart828908c2020-04-15 14:23:45 -0700287 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400288
289 return nil
290}
291
292func DecodeActionBsnChecksum(parent *ActionBsn, decoder *goloxi.Decoder) (*ActionBsnChecksum, error) {
293 _actionbsnchecksum := &ActionBsnChecksum{ActionBsn: parent}
294 if decoder.Length() < 16 {
295 return nil, fmt.Errorf("ActionBsnChecksum packet too short: %d < 16", decoder.Length())
296 }
297 _actionbsnchecksum.Checksum.Decode(decoder)
298 return _actionbsnchecksum, nil
299}
300
301func NewActionBsnChecksum() *ActionBsnChecksum {
302 obj := &ActionBsnChecksum{
303 ActionBsn: NewActionBsn(4),
304 }
305 return obj
306}
307func (self *ActionBsnChecksum) GetActionName() string {
308 return "bsn_checksum"
309}
310
311func (self *ActionBsnChecksum) GetActionFields() map[string]interface{} {
312 return map[string]interface{}{
313 "Checksum": self.Checksum,
314 }
315}
316
317func (self *ActionBsnChecksum) MarshalJSON() ([]byte, error) {
318 jsonValue, err := json.Marshal(self.GetActionFields())
319 if err != nil {
320 return nil, err
321 }
322 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
323}
324
325type ActionBsnGentable struct {
326 *ActionBsn
327 TableId uint32
328 Key []IBsnTlv
329}
330
331type IActionBsnGentable interface {
332 IActionBsn
333 GetTableId() uint32
334 GetKey() []IBsnTlv
335}
336
337func (self *ActionBsnGentable) GetTableId() uint32 {
338 return self.TableId
339}
340
341func (self *ActionBsnGentable) SetTableId(v uint32) {
342 self.TableId = v
343}
344
345func (self *ActionBsnGentable) GetKey() []IBsnTlv {
346 return self.Key
347}
348
349func (self *ActionBsnGentable) SetKey(v []IBsnTlv) {
350 self.Key = v
351}
352
353func (self *ActionBsnGentable) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700354 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400355 if err := self.ActionBsn.Serialize(encoder); err != nil {
356 return err
357 }
358
359 encoder.PutUint32(uint32(self.TableId))
360 for _, obj := range self.Key {
361 if err := obj.Serialize(encoder); err != nil {
362 return err
363 }
364 }
Jonathan Hart828908c2020-04-15 14:23:45 -0700365 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400366
Jonathan Hart828908c2020-04-15 14:23:45 -0700367 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400368
369 return nil
370}
371
372func DecodeActionBsnGentable(parent *ActionBsn, decoder *goloxi.Decoder) (*ActionBsnGentable, error) {
373 _actionbsngentable := &ActionBsnGentable{ActionBsn: parent}
374 if decoder.Length() < 4 {
375 return nil, fmt.Errorf("ActionBsnGentable packet too short: %d < 4", decoder.Length())
376 }
377 _actionbsngentable.TableId = uint32(decoder.ReadUint32())
378
379 for decoder.Length() >= 4 {
380 item, err := DecodeBsnTlv(decoder)
381 if err != nil {
382 return nil, err
383 }
384 if item != nil {
385 _actionbsngentable.Key = append(_actionbsngentable.Key, item)
386 }
387 }
388 return _actionbsngentable, nil
389}
390
391func NewActionBsnGentable() *ActionBsnGentable {
392 obj := &ActionBsnGentable{
393 ActionBsn: NewActionBsn(5),
394 }
395 return obj
396}
397func (self *ActionBsnGentable) GetActionName() string {
398 return "bsn_gentable"
399}
400
401func (self *ActionBsnGentable) GetActionFields() map[string]interface{} {
402 return map[string]interface{}{
403 "TableId": self.TableId,
404 "Key": self.Key,
405 }
406}
407
408func (self *ActionBsnGentable) MarshalJSON() ([]byte, error) {
409 jsonValue, err := json.Marshal(self.GetActionFields())
410 if err != nil {
411 return nil, err
412 }
413 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
414}
415
416type ActionBsnMirror struct {
417 *ActionBsn
418 DestPort uint32
419 VlanTag uint32
420 CopyStage uint8
421}
422
423type IActionBsnMirror interface {
424 IActionBsn
425 GetDestPort() uint32
426 GetVlanTag() uint32
427 GetCopyStage() uint8
428}
429
430func (self *ActionBsnMirror) GetDestPort() uint32 {
431 return self.DestPort
432}
433
434func (self *ActionBsnMirror) SetDestPort(v uint32) {
435 self.DestPort = v
436}
437
438func (self *ActionBsnMirror) GetVlanTag() uint32 {
439 return self.VlanTag
440}
441
442func (self *ActionBsnMirror) SetVlanTag(v uint32) {
443 self.VlanTag = v
444}
445
446func (self *ActionBsnMirror) GetCopyStage() uint8 {
447 return self.CopyStage
448}
449
450func (self *ActionBsnMirror) SetCopyStage(v uint8) {
451 self.CopyStage = v
452}
453
454func (self *ActionBsnMirror) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700455 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400456 if err := self.ActionBsn.Serialize(encoder); err != nil {
457 return err
458 }
459
460 encoder.PutUint32(uint32(self.DestPort))
461 encoder.PutUint32(uint32(self.VlanTag))
462 encoder.PutUint8(uint8(self.CopyStage))
463 encoder.Write(bytes.Repeat([]byte{0}, 3))
Jonathan Hart828908c2020-04-15 14:23:45 -0700464 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400465
Jonathan Hart828908c2020-04-15 14:23:45 -0700466 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400467
468 return nil
469}
470
471func DecodeActionBsnMirror(parent *ActionBsn, decoder *goloxi.Decoder) (*ActionBsnMirror, error) {
472 _actionbsnmirror := &ActionBsnMirror{ActionBsn: parent}
473 if decoder.Length() < 12 {
474 return nil, fmt.Errorf("ActionBsnMirror packet too short: %d < 12", decoder.Length())
475 }
476 _actionbsnmirror.DestPort = uint32(decoder.ReadUint32())
477 _actionbsnmirror.VlanTag = uint32(decoder.ReadUint32())
478 _actionbsnmirror.CopyStage = uint8(decoder.ReadByte())
479 decoder.Skip(3)
480 return _actionbsnmirror, nil
481}
482
483func NewActionBsnMirror() *ActionBsnMirror {
484 obj := &ActionBsnMirror{
485 ActionBsn: NewActionBsn(1),
486 }
487 return obj
488}
489func (self *ActionBsnMirror) GetActionName() string {
490 return "bsn_mirror"
491}
492
493func (self *ActionBsnMirror) GetActionFields() map[string]interface{} {
494 return map[string]interface{}{
495 "DestPort": self.DestPort,
496 "VlanTag": self.VlanTag,
497 "CopyStage": self.CopyStage,
498 }
499}
500
501func (self *ActionBsnMirror) MarshalJSON() ([]byte, error) {
502 jsonValue, err := json.Marshal(self.GetActionFields())
503 if err != nil {
504 return nil, err
505 }
506 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
507}
508
509type ActionBsnSetTunnelDst struct {
510 *ActionBsn
511 Dst uint32
512}
513
514type IActionBsnSetTunnelDst interface {
515 IActionBsn
516 GetDst() uint32
517}
518
519func (self *ActionBsnSetTunnelDst) GetDst() uint32 {
520 return self.Dst
521}
522
523func (self *ActionBsnSetTunnelDst) SetDst(v uint32) {
524 self.Dst = v
525}
526
527func (self *ActionBsnSetTunnelDst) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700528 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400529 if err := self.ActionBsn.Serialize(encoder); err != nil {
530 return err
531 }
532
533 encoder.PutUint32(uint32(self.Dst))
Jonathan Hart828908c2020-04-15 14:23:45 -0700534 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400535
Jonathan Hart828908c2020-04-15 14:23:45 -0700536 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400537
538 return nil
539}
540
541func DecodeActionBsnSetTunnelDst(parent *ActionBsn, decoder *goloxi.Decoder) (*ActionBsnSetTunnelDst, error) {
542 _actionbsnsettunneldst := &ActionBsnSetTunnelDst{ActionBsn: parent}
543 if decoder.Length() < 4 {
544 return nil, fmt.Errorf("ActionBsnSetTunnelDst packet too short: %d < 4", decoder.Length())
545 }
546 _actionbsnsettunneldst.Dst = uint32(decoder.ReadUint32())
547 return _actionbsnsettunneldst, nil
548}
549
550func NewActionBsnSetTunnelDst() *ActionBsnSetTunnelDst {
551 obj := &ActionBsnSetTunnelDst{
552 ActionBsn: NewActionBsn(2),
553 }
554 return obj
555}
556func (self *ActionBsnSetTunnelDst) GetActionName() string {
557 return "bsn_set_tunnel_dst"
558}
559
560func (self *ActionBsnSetTunnelDst) GetActionFields() map[string]interface{} {
561 return map[string]interface{}{
562 "Dst": self.Dst,
563 }
564}
565
566func (self *ActionBsnSetTunnelDst) MarshalJSON() ([]byte, error) {
567 jsonValue, err := json.Marshal(self.GetActionFields())
568 if err != nil {
569 return nil, err
570 }
571 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
572}
573
574type ActionCopyTtlIn struct {
575 *Action
576}
577
578type IActionCopyTtlIn interface {
579 goloxi.IAction
580}
581
582func (self *ActionCopyTtlIn) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700583 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400584 if err := self.Action.Serialize(encoder); err != nil {
585 return err
586 }
587
588 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -0700589 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400590
Jonathan Hart828908c2020-04-15 14:23:45 -0700591 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400592
593 return nil
594}
595
596func DecodeActionCopyTtlIn(parent *Action, decoder *goloxi.Decoder) (*ActionCopyTtlIn, error) {
597 _actioncopyttlin := &ActionCopyTtlIn{Action: parent}
598 if decoder.Length() < 4 {
599 return nil, fmt.Errorf("ActionCopyTtlIn packet too short: %d < 4", decoder.Length())
600 }
601 decoder.Skip(4)
602 return _actioncopyttlin, nil
603}
604
605func NewActionCopyTtlIn() *ActionCopyTtlIn {
606 obj := &ActionCopyTtlIn{
607 Action: NewAction(12),
608 }
609 return obj
610}
611func (self *ActionCopyTtlIn) GetActionName() string {
612 return "copy_ttl_in"
613}
614
615func (self *ActionCopyTtlIn) GetActionFields() map[string]interface{} {
616 return map[string]interface{}{}
617}
618
619func (self *ActionCopyTtlIn) MarshalJSON() ([]byte, error) {
620 jsonValue, err := json.Marshal(self.GetActionFields())
621 if err != nil {
622 return nil, err
623 }
624 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
625}
626
627type ActionCopyTtlOut struct {
628 *Action
629}
630
631type IActionCopyTtlOut interface {
632 goloxi.IAction
633}
634
635func (self *ActionCopyTtlOut) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700636 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400637 if err := self.Action.Serialize(encoder); err != nil {
638 return err
639 }
640
641 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -0700642 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400643
Jonathan Hart828908c2020-04-15 14:23:45 -0700644 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400645
646 return nil
647}
648
649func DecodeActionCopyTtlOut(parent *Action, decoder *goloxi.Decoder) (*ActionCopyTtlOut, error) {
650 _actioncopyttlout := &ActionCopyTtlOut{Action: parent}
651 if decoder.Length() < 4 {
652 return nil, fmt.Errorf("ActionCopyTtlOut packet too short: %d < 4", decoder.Length())
653 }
654 decoder.Skip(4)
655 return _actioncopyttlout, nil
656}
657
658func NewActionCopyTtlOut() *ActionCopyTtlOut {
659 obj := &ActionCopyTtlOut{
660 Action: NewAction(11),
661 }
662 return obj
663}
664func (self *ActionCopyTtlOut) GetActionName() string {
665 return "copy_ttl_out"
666}
667
668func (self *ActionCopyTtlOut) GetActionFields() map[string]interface{} {
669 return map[string]interface{}{}
670}
671
672func (self *ActionCopyTtlOut) MarshalJSON() ([]byte, error) {
673 jsonValue, err := json.Marshal(self.GetActionFields())
674 if err != nil {
675 return nil, err
676 }
677 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
678}
679
680type ActionDecMplsTtl struct {
681 *Action
682}
683
684type IActionDecMplsTtl interface {
685 goloxi.IAction
686}
687
688func (self *ActionDecMplsTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700689 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400690 if err := self.Action.Serialize(encoder); err != nil {
691 return err
692 }
693
694 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -0700695 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400696
Jonathan Hart828908c2020-04-15 14:23:45 -0700697 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400698
699 return nil
700}
701
702func DecodeActionDecMplsTtl(parent *Action, decoder *goloxi.Decoder) (*ActionDecMplsTtl, error) {
703 _actiondecmplsttl := &ActionDecMplsTtl{Action: parent}
704 if decoder.Length() < 4 {
705 return nil, fmt.Errorf("ActionDecMplsTtl packet too short: %d < 4", decoder.Length())
706 }
707 decoder.Skip(4)
708 return _actiondecmplsttl, nil
709}
710
711func NewActionDecMplsTtl() *ActionDecMplsTtl {
712 obj := &ActionDecMplsTtl{
713 Action: NewAction(16),
714 }
715 return obj
716}
717func (self *ActionDecMplsTtl) GetActionName() string {
718 return "dec_mpls_ttl"
719}
720
721func (self *ActionDecMplsTtl) GetActionFields() map[string]interface{} {
722 return map[string]interface{}{}
723}
724
725func (self *ActionDecMplsTtl) MarshalJSON() ([]byte, error) {
726 jsonValue, err := json.Marshal(self.GetActionFields())
727 if err != nil {
728 return nil, err
729 }
730 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
731}
732
733type ActionDecNwTtl struct {
734 *Action
735}
736
737type IActionDecNwTtl interface {
738 goloxi.IAction
739}
740
741func (self *ActionDecNwTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700742 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400743 if err := self.Action.Serialize(encoder); err != nil {
744 return err
745 }
746
747 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -0700748 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400749
Jonathan Hart828908c2020-04-15 14:23:45 -0700750 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400751
752 return nil
753}
754
755func DecodeActionDecNwTtl(parent *Action, decoder *goloxi.Decoder) (*ActionDecNwTtl, error) {
756 _actiondecnwttl := &ActionDecNwTtl{Action: parent}
757 if decoder.Length() < 4 {
758 return nil, fmt.Errorf("ActionDecNwTtl packet too short: %d < 4", decoder.Length())
759 }
760 decoder.Skip(4)
761 return _actiondecnwttl, nil
762}
763
764func NewActionDecNwTtl() *ActionDecNwTtl {
765 obj := &ActionDecNwTtl{
766 Action: NewAction(24),
767 }
768 return obj
769}
770func (self *ActionDecNwTtl) GetActionName() string {
771 return "dec_nw_ttl"
772}
773
774func (self *ActionDecNwTtl) GetActionFields() map[string]interface{} {
775 return map[string]interface{}{}
776}
777
778func (self *ActionDecNwTtl) MarshalJSON() ([]byte, error) {
779 jsonValue, err := json.Marshal(self.GetActionFields())
780 if err != nil {
781 return nil, err
782 }
783 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
784}
785
786type ActionGroup struct {
787 *Action
788 GroupId uint32
789}
790
791type IActionGroup interface {
792 goloxi.IAction
793 GetGroupId() uint32
794}
795
796func (self *ActionGroup) GetGroupId() uint32 {
797 return self.GroupId
798}
799
800func (self *ActionGroup) SetGroupId(v uint32) {
801 self.GroupId = v
802}
803
804func (self *ActionGroup) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -0700805 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -0400806 if err := self.Action.Serialize(encoder); err != nil {
807 return err
808 }
809
810 encoder.PutUint32(uint32(self.GroupId))
Jonathan Hart828908c2020-04-15 14:23:45 -0700811 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -0400812
Jonathan Hart828908c2020-04-15 14:23:45 -0700813 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -0400814
815 return nil
816}
817
818func DecodeActionGroup(parent *Action, decoder *goloxi.Decoder) (*ActionGroup, error) {
819 _actiongroup := &ActionGroup{Action: parent}
820 if decoder.Length() < 4 {
821 return nil, fmt.Errorf("ActionGroup packet too short: %d < 4", decoder.Length())
822 }
823 _actiongroup.GroupId = uint32(decoder.ReadUint32())
824 return _actiongroup, nil
825}
826
827func NewActionGroup() *ActionGroup {
828 obj := &ActionGroup{
829 Action: NewAction(22),
830 }
831 return obj
832}
833func (self *ActionGroup) GetActionName() string {
834 return "group"
835}
836
837func (self *ActionGroup) GetActionFields() map[string]interface{} {
838 return map[string]interface{}{
839 "GroupId": self.GroupId,
840 }
841}
842
843func (self *ActionGroup) MarshalJSON() ([]byte, error) {
844 jsonValue, err := json.Marshal(self.GetActionFields())
845 if err != nil {
846 return nil, err
847 }
848 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
849}
850
851type ActionNicira struct {
852 *ActionExperimenter
853 Subtype uint16
854}
855
856type IActionNicira interface {
857 IActionExperimenter
858 GetSubtype() uint16
859}
860
861func (self *ActionNicira) GetSubtype() uint16 {
862 return self.Subtype
863}
864
865func (self *ActionNicira) SetSubtype(v uint16) {
866 self.Subtype = v
867}
868
869func (self *ActionNicira) Serialize(encoder *goloxi.Encoder) error {
870 if err := self.ActionExperimenter.Serialize(encoder); err != nil {
871 return err
872 }
873
874 encoder.PutUint16(uint16(self.Subtype))
875
876 return nil
877}
878
879func DecodeActionNicira(parent *ActionExperimenter, decoder *goloxi.Decoder) (IActionNicira, error) {
880 _actionnicira := &ActionNicira{ActionExperimenter: parent}
881 if decoder.Length() < 2 {
882 return nil, fmt.Errorf("ActionNicira packet too short: %d < 2", decoder.Length())
883 }
884 _actionnicira.Subtype = uint16(decoder.ReadUint16())
885
886 switch _actionnicira.Subtype {
887 case 1:
888 return DecodeActionNxResubmit(_actionnicira, decoder)
889 case 2:
890 return DecodeActionNxSetTunnel(_actionnicira, decoder)
891 case 4:
892 return DecodeActionNxSetQueue(_actionnicira, decoder)
893 case 5:
894 return DecodeActionNxPopQueue(_actionnicira, decoder)
895 case 6:
896 return DecodeActionNxRegMove(_actionnicira, decoder)
897 case 7:
898 return DecodeActionNxRegLoad(_actionnicira, decoder)
899 case 8:
900 return DecodeActionNxNote(_actionnicira, decoder)
901 case 9:
902 return DecodeActionNxSetTunnel64(_actionnicira, decoder)
903 case 10:
904 return DecodeActionNxMultipath(_actionnicira, decoder)
905 case 12:
906 return DecodeActionNxBundle(_actionnicira, decoder)
907 case 13:
908 return DecodeActionNxBundleLoadInPort(_actionnicira, decoder)
909 case 14:
910 return DecodeActionResubmit(_actionnicira, decoder)
911 case 15:
912 return DecodeActionNxOutputReg(_actionnicira, decoder)
913 case 16:
914 return DecodeActionNxLearn(_actionnicira, decoder)
915 case 17:
916 return DecodeActionNxExit(_actionnicira, decoder)
917 case 18:
918 return DecodeActionNiciraDecTtl(_actionnicira, decoder)
919 case 19:
920 return DecodeActionNxFinTimeout(_actionnicira, decoder)
921 case 20:
922 return DecodeActionNxController(_actionnicira, decoder)
923 case 21:
924 return DecodeActionNxDecTtlCntIds(_actionnicira, decoder)
925 case 22:
926 return DecodeActionNxWriteMetadata(_actionnicira, decoder)
927 case 23:
928 return DecodeActionNxPushMpls(_actionnicira, decoder)
929 case 24:
930 return DecodeActionNxPopMpls(_actionnicira, decoder)
931 case 25:
932 return DecodeActionNxSetMplsTtl(_actionnicira, decoder)
933 case 26:
934 return DecodeActionNxDecMplsTtl(_actionnicira, decoder)
935 case 27:
936 return DecodeActionNxStackPush(_actionnicira, decoder)
937 case 28:
938 return DecodeActionNxStackPop(_actionnicira, decoder)
939 case 29:
940 return DecodeActionNxSample(_actionnicira, decoder)
941 case 30:
942 return DecodeActionNxSetMplsLabel(_actionnicira, decoder)
943 case 31:
944 return DecodeActionNxSetMplsTc(_actionnicira, decoder)
945 case 32:
946 return DecodeActionNxOutputReg2(_actionnicira, decoder)
947 case 33:
948 return DecodeActionNxRegLoad2(_actionnicira, decoder)
949 case 34:
950 return DecodeActionNxConjunction(_actionnicira, decoder)
951 case 35:
952 return DecodeActionNxCt(_actionnicira, decoder)
953 case 36:
954 return DecodeActionNxNat(_actionnicira, decoder)
955 case 37:
956 return DecodeActionNxController2(_actionnicira, decoder)
957 case 38:
958 return DecodeActionNxSample2(_actionnicira, decoder)
959 case 39:
960 return DecodeActionNxOutputTrunc(_actionnicira, decoder)
961 case 40:
962 return DecodeActionNxGroup(_actionnicira, decoder)
963 case 41:
964 return DecodeActionNxSample3(_actionnicira, decoder)
965 case 42:
966 return DecodeActionNxClone(_actionnicira, decoder)
967 case 43:
968 return DecodeActionNxCtClear(_actionnicira, decoder)
969 case 44:
970 return DecodeActionNxResubmitTableCt(_actionnicira, decoder)
971 case 45:
972 return DecodeActionNxLearn2(_actionnicira, decoder)
973 case 46:
974 return DecodeActionNxEncap(_actionnicira, decoder)
975 case 47:
976 return DecodeActionNxDecap(_actionnicira, decoder)
977 case 48:
978 return DecodeActionNxDecNshTtl(_actionnicira, decoder)
979 case 254:
980 return DecodeActionNxDebugSlow(_actionnicira, decoder)
981 case 255:
982 return DecodeActionNxDebugRecirc(_actionnicira, decoder)
983 default:
984 return nil, fmt.Errorf("Invalid type '%d' for 'ActionNicira'", _actionnicira.Subtype)
985 }
986}
987
988func NewActionNicira(_subtype uint16) *ActionNicira {
989 obj := &ActionNicira{
990 ActionExperimenter: NewActionExperimenter(8992),
991 }
992 obj.Subtype = _subtype
993 return obj
994}
995func (self *ActionNicira) GetActionName() string {
996 return "nicira"
997}
998
999func (self *ActionNicira) GetActionFields() map[string]interface{} {
1000 return map[string]interface{}{
1001 "Subtype": self.Subtype,
1002 }
1003}
1004
1005func (self *ActionNicira) MarshalJSON() ([]byte, error) {
1006 jsonValue, err := json.Marshal(self.GetActionFields())
1007 if err != nil {
1008 return nil, err
1009 }
1010 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1011}
1012
1013type ActionNiciraDecTtl struct {
1014 *ActionNicira
1015}
1016
1017type IActionNiciraDecTtl interface {
1018 IActionNicira
1019}
1020
1021func (self *ActionNiciraDecTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001022 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001023 if err := self.ActionNicira.Serialize(encoder); err != nil {
1024 return err
1025 }
1026
1027 encoder.Write(bytes.Repeat([]byte{0}, 2))
1028 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -07001029 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001030
Jonathan Hart828908c2020-04-15 14:23:45 -07001031 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001032
1033 return nil
1034}
1035
1036func DecodeActionNiciraDecTtl(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNiciraDecTtl, error) {
1037 _actionniciradecttl := &ActionNiciraDecTtl{ActionNicira: parent}
1038 if decoder.Length() < 6 {
1039 return nil, fmt.Errorf("ActionNiciraDecTtl packet too short: %d < 6", decoder.Length())
1040 }
1041 decoder.Skip(2)
1042 decoder.Skip(4)
1043 return _actionniciradecttl, nil
1044}
1045
1046func NewActionNiciraDecTtl() *ActionNiciraDecTtl {
1047 obj := &ActionNiciraDecTtl{
1048 ActionNicira: NewActionNicira(18),
1049 }
1050 return obj
1051}
1052func (self *ActionNiciraDecTtl) GetActionName() string {
1053 return "nicira_dec_ttl"
1054}
1055
1056func (self *ActionNiciraDecTtl) GetActionFields() map[string]interface{} {
1057 return map[string]interface{}{}
1058}
1059
1060func (self *ActionNiciraDecTtl) MarshalJSON() ([]byte, error) {
1061 jsonValue, err := json.Marshal(self.GetActionFields())
1062 if err != nil {
1063 return nil, err
1064 }
1065 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1066}
1067
1068type ActionNxBundle struct {
1069 *ActionNicira
1070 Algorithm uint16
1071 Fields NxHashFields
1072 Basis uint16
1073 SlaveType ActionNxBundleSlaveType
1074 NSlaves uint16
1075 OfsNbits uint16
1076 Dst goloxi.IOxmId
1077}
1078
1079type IActionNxBundle interface {
1080 IActionNicira
1081 GetAlgorithm() uint16
1082 GetFields() NxHashFields
1083 GetBasis() uint16
1084 GetSlaveType() ActionNxBundleSlaveType
1085 GetNSlaves() uint16
1086 GetOfsNbits() uint16
1087 GetDst() goloxi.IOxmId
1088}
1089
1090func (self *ActionNxBundle) GetAlgorithm() uint16 {
1091 return self.Algorithm
1092}
1093
1094func (self *ActionNxBundle) SetAlgorithm(v uint16) {
1095 self.Algorithm = v
1096}
1097
1098func (self *ActionNxBundle) GetFields() NxHashFields {
1099 return self.Fields
1100}
1101
1102func (self *ActionNxBundle) SetFields(v NxHashFields) {
1103 self.Fields = v
1104}
1105
1106func (self *ActionNxBundle) GetBasis() uint16 {
1107 return self.Basis
1108}
1109
1110func (self *ActionNxBundle) SetBasis(v uint16) {
1111 self.Basis = v
1112}
1113
1114func (self *ActionNxBundle) GetSlaveType() ActionNxBundleSlaveType {
1115 return self.SlaveType
1116}
1117
1118func (self *ActionNxBundle) SetSlaveType(v ActionNxBundleSlaveType) {
1119 self.SlaveType = v
1120}
1121
1122func (self *ActionNxBundle) GetNSlaves() uint16 {
1123 return self.NSlaves
1124}
1125
1126func (self *ActionNxBundle) SetNSlaves(v uint16) {
1127 self.NSlaves = v
1128}
1129
1130func (self *ActionNxBundle) GetOfsNbits() uint16 {
1131 return self.OfsNbits
1132}
1133
1134func (self *ActionNxBundle) SetOfsNbits(v uint16) {
1135 self.OfsNbits = v
1136}
1137
1138func (self *ActionNxBundle) GetDst() goloxi.IOxmId {
1139 return self.Dst
1140}
1141
1142func (self *ActionNxBundle) SetDst(v goloxi.IOxmId) {
1143 self.Dst = v
1144}
1145
1146func (self *ActionNxBundle) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001147 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001148 if err := self.ActionNicira.Serialize(encoder); err != nil {
1149 return err
1150 }
1151
1152 encoder.PutUint16(uint16(self.Algorithm))
1153 encoder.PutUint16(uint16(self.Fields))
1154 encoder.PutUint16(uint16(self.Basis))
1155 encoder.PutUint32(uint32(self.SlaveType))
1156 encoder.PutUint16(uint16(self.NSlaves))
1157 encoder.PutUint16(uint16(self.OfsNbits))
1158 self.Dst.Serialize(encoder)
1159 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -07001160 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001161
Jonathan Hart828908c2020-04-15 14:23:45 -07001162 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001163
1164 return nil
1165}
1166
1167func DecodeActionNxBundle(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxBundle, error) {
1168 _actionnxbundle := &ActionNxBundle{ActionNicira: parent}
1169 if decoder.Length() < 22 {
1170 return nil, fmt.Errorf("ActionNxBundle packet too short: %d < 22", decoder.Length())
1171 }
1172 _actionnxbundle.Algorithm = uint16(decoder.ReadUint16())
1173 _actionnxbundle.Fields = NxHashFields(decoder.ReadUint16())
1174 _actionnxbundle.Basis = uint16(decoder.ReadUint16())
1175 _actionnxbundle.SlaveType = ActionNxBundleSlaveType(decoder.ReadUint32())
1176 _actionnxbundle.NSlaves = uint16(decoder.ReadUint16())
1177 _actionnxbundle.OfsNbits = uint16(decoder.ReadUint16())
1178 if obj, err := DecodeOxmId(decoder); err != nil {
1179 return nil, err
1180 } else {
1181 _actionnxbundle.Dst = obj
1182 }
1183
1184 decoder.Skip(4)
1185 return _actionnxbundle, nil
1186}
1187
1188func NewActionNxBundle() *ActionNxBundle {
1189 obj := &ActionNxBundle{
1190 ActionNicira: NewActionNicira(12),
1191 }
1192 return obj
1193}
1194func (self *ActionNxBundle) GetActionName() string {
1195 return "nx_bundle"
1196}
1197
1198func (self *ActionNxBundle) GetActionFields() map[string]interface{} {
1199 return map[string]interface{}{
1200 "Algorithm": self.Algorithm,
1201 "Fields": self.Fields,
1202 "Basis": self.Basis,
1203 "SlaveType": self.SlaveType,
1204 "NSlaves": self.NSlaves,
1205 "OfsNbits": self.OfsNbits,
1206 "Dst": self.Dst,
1207 }
1208}
1209
1210func (self *ActionNxBundle) MarshalJSON() ([]byte, error) {
1211 jsonValue, err := json.Marshal(self.GetActionFields())
1212 if err != nil {
1213 return nil, err
1214 }
1215 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1216}
1217
1218type ActionNxBundleLoad struct {
1219 *ActionNicira
1220 Algorithm NxBdAlgorithms
1221 Fields NxHashFields
1222 Basis uint16
1223 SlaveType ActionNxBundleSlaveType
1224 NSlaves uint16
1225 OfsNbits uint16
1226 Dst goloxi.IOxmId
1227}
1228
1229type IActionNxBundleLoad interface {
1230 IActionNicira
1231 GetAlgorithm() NxBdAlgorithms
1232 GetFields() NxHashFields
1233 GetBasis() uint16
1234 GetSlaveType() ActionNxBundleSlaveType
1235 GetNSlaves() uint16
1236 GetOfsNbits() uint16
1237 GetDst() goloxi.IOxmId
1238}
1239
1240func (self *ActionNxBundleLoad) GetAlgorithm() NxBdAlgorithms {
1241 return self.Algorithm
1242}
1243
1244func (self *ActionNxBundleLoad) SetAlgorithm(v NxBdAlgorithms) {
1245 self.Algorithm = v
1246}
1247
1248func (self *ActionNxBundleLoad) GetFields() NxHashFields {
1249 return self.Fields
1250}
1251
1252func (self *ActionNxBundleLoad) SetFields(v NxHashFields) {
1253 self.Fields = v
1254}
1255
1256func (self *ActionNxBundleLoad) GetBasis() uint16 {
1257 return self.Basis
1258}
1259
1260func (self *ActionNxBundleLoad) SetBasis(v uint16) {
1261 self.Basis = v
1262}
1263
1264func (self *ActionNxBundleLoad) GetSlaveType() ActionNxBundleSlaveType {
1265 return self.SlaveType
1266}
1267
1268func (self *ActionNxBundleLoad) SetSlaveType(v ActionNxBundleSlaveType) {
1269 self.SlaveType = v
1270}
1271
1272func (self *ActionNxBundleLoad) GetNSlaves() uint16 {
1273 return self.NSlaves
1274}
1275
1276func (self *ActionNxBundleLoad) SetNSlaves(v uint16) {
1277 self.NSlaves = v
1278}
1279
1280func (self *ActionNxBundleLoad) GetOfsNbits() uint16 {
1281 return self.OfsNbits
1282}
1283
1284func (self *ActionNxBundleLoad) SetOfsNbits(v uint16) {
1285 self.OfsNbits = v
1286}
1287
1288func (self *ActionNxBundleLoad) GetDst() goloxi.IOxmId {
1289 return self.Dst
1290}
1291
1292func (self *ActionNxBundleLoad) SetDst(v goloxi.IOxmId) {
1293 self.Dst = v
1294}
1295
1296func (self *ActionNxBundleLoad) Serialize(encoder *goloxi.Encoder) error {
1297 if err := self.ActionNicira.Serialize(encoder); err != nil {
1298 return err
1299 }
1300
1301 encoder.PutUint16(uint16(self.Algorithm))
1302 encoder.PutUint16(uint16(self.Fields))
1303 encoder.PutUint16(uint16(self.Basis))
1304 encoder.PutUint32(uint32(self.SlaveType))
1305 encoder.PutUint16(uint16(self.NSlaves))
1306 encoder.PutUint16(uint16(self.OfsNbits))
1307 self.Dst.Serialize(encoder)
1308
1309 return nil
1310}
1311
1312func DecodeActionNxBundleLoad(parent *ActionNicira, decoder *goloxi.Decoder) (IActionNxBundleLoad, error) {
1313 _actionnxbundleload := &ActionNxBundleLoad{ActionNicira: parent}
1314 if decoder.Length() < 18 {
1315 return nil, fmt.Errorf("ActionNxBundleLoad packet too short: %d < 18", decoder.Length())
1316 }
1317 _actionnxbundleload.Algorithm = NxBdAlgorithms(decoder.ReadUint16())
1318 _actionnxbundleload.Fields = NxHashFields(decoder.ReadUint16())
1319 _actionnxbundleload.Basis = uint16(decoder.ReadUint16())
1320 _actionnxbundleload.SlaveType = ActionNxBundleSlaveType(decoder.ReadUint32())
1321 _actionnxbundleload.NSlaves = uint16(decoder.ReadUint16())
1322 _actionnxbundleload.OfsNbits = uint16(decoder.ReadUint16())
1323 if obj, err := DecodeOxmId(decoder); err != nil {
1324 return nil, err
1325 } else {
1326 _actionnxbundleload.Dst = obj
1327 }
1328
1329 return _actionnxbundleload, nil
1330}
1331
1332func NewActionNxBundleLoad(_slave_type ActionNxBundleSlaveType) *ActionNxBundleLoad {
1333 obj := &ActionNxBundleLoad{
1334 ActionNicira: NewActionNicira(13),
1335 }
1336 obj.SlaveType = _slave_type
1337 return obj
1338}
1339func (self *ActionNxBundleLoad) GetActionName() string {
1340 return "nx_bundle_load"
1341}
1342
1343func (self *ActionNxBundleLoad) GetActionFields() map[string]interface{} {
1344 return map[string]interface{}{
1345 "Algorithm": self.Algorithm,
1346 "Fields": self.Fields,
1347 "Basis": self.Basis,
1348 "SlaveType": self.SlaveType,
1349 "NSlaves": self.NSlaves,
1350 "OfsNbits": self.OfsNbits,
1351 "Dst": self.Dst,
1352 }
1353}
1354
1355func (self *ActionNxBundleLoad) MarshalJSON() ([]byte, error) {
1356 jsonValue, err := json.Marshal(self.GetActionFields())
1357 if err != nil {
1358 return nil, err
1359 }
1360 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1361}
1362
1363type ActionNxBundleLoadInPort struct {
1364 *ActionNicira
1365 Algorithm NxBdAlgorithms
1366 Fields NxHashFields
1367 Basis uint16
1368 SlaveType ActionNxBundleSlaveType
1369 NSlaves uint16
1370 OfsNbits uint16
1371 Dst goloxi.IOxmId
1372 InPorts []*ActionNxBundleLoadSlave
1373}
1374
1375type IActionNxBundleLoadInPort interface {
1376 IActionNicira
1377 GetAlgorithm() NxBdAlgorithms
1378 GetFields() NxHashFields
1379 GetBasis() uint16
1380 GetSlaveType() ActionNxBundleSlaveType
1381 GetNSlaves() uint16
1382 GetOfsNbits() uint16
1383 GetDst() goloxi.IOxmId
1384 GetInPorts() []*ActionNxBundleLoadSlave
1385}
1386
1387func (self *ActionNxBundleLoadInPort) GetAlgorithm() NxBdAlgorithms {
1388 return self.Algorithm
1389}
1390
1391func (self *ActionNxBundleLoadInPort) SetAlgorithm(v NxBdAlgorithms) {
1392 self.Algorithm = v
1393}
1394
1395func (self *ActionNxBundleLoadInPort) GetFields() NxHashFields {
1396 return self.Fields
1397}
1398
1399func (self *ActionNxBundleLoadInPort) SetFields(v NxHashFields) {
1400 self.Fields = v
1401}
1402
1403func (self *ActionNxBundleLoadInPort) GetBasis() uint16 {
1404 return self.Basis
1405}
1406
1407func (self *ActionNxBundleLoadInPort) SetBasis(v uint16) {
1408 self.Basis = v
1409}
1410
1411func (self *ActionNxBundleLoadInPort) GetSlaveType() ActionNxBundleSlaveType {
1412 return self.SlaveType
1413}
1414
1415func (self *ActionNxBundleLoadInPort) SetSlaveType(v ActionNxBundleSlaveType) {
1416 self.SlaveType = v
1417}
1418
1419func (self *ActionNxBundleLoadInPort) GetNSlaves() uint16 {
1420 return self.NSlaves
1421}
1422
1423func (self *ActionNxBundleLoadInPort) SetNSlaves(v uint16) {
1424 self.NSlaves = v
1425}
1426
1427func (self *ActionNxBundleLoadInPort) GetOfsNbits() uint16 {
1428 return self.OfsNbits
1429}
1430
1431func (self *ActionNxBundleLoadInPort) SetOfsNbits(v uint16) {
1432 self.OfsNbits = v
1433}
1434
1435func (self *ActionNxBundleLoadInPort) GetDst() goloxi.IOxmId {
1436 return self.Dst
1437}
1438
1439func (self *ActionNxBundleLoadInPort) SetDst(v goloxi.IOxmId) {
1440 self.Dst = v
1441}
1442
1443func (self *ActionNxBundleLoadInPort) GetInPorts() []*ActionNxBundleLoadSlave {
1444 return self.InPorts
1445}
1446
1447func (self *ActionNxBundleLoadInPort) SetInPorts(v []*ActionNxBundleLoadSlave) {
1448 self.InPorts = v
1449}
1450
1451func (self *ActionNxBundleLoadInPort) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001452 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001453 if err := self.ActionNicira.Serialize(encoder); err != nil {
1454 return err
1455 }
1456
1457 encoder.PutUint16(uint16(self.Algorithm))
1458 encoder.PutUint16(uint16(self.Fields))
1459 encoder.PutUint16(uint16(self.Basis))
1460 encoder.PutUint32(uint32(self.SlaveType))
1461 encoder.PutUint16(uint16(self.NSlaves))
1462 encoder.PutUint16(uint16(self.OfsNbits))
1463 self.Dst.Serialize(encoder)
1464 encoder.Write(bytes.Repeat([]byte{0}, 4))
1465 for _, obj := range self.InPorts {
1466 if err := obj.Serialize(encoder); err != nil {
1467 return err
1468 }
1469 }
Jonathan Hart828908c2020-04-15 14:23:45 -07001470 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001471
Jonathan Hart828908c2020-04-15 14:23:45 -07001472 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001473
1474 return nil
1475}
1476
1477func DecodeActionNxBundleLoadInPort(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxBundleLoadInPort, error) {
1478 _actionnxbundleloadinport := &ActionNxBundleLoadInPort{ActionNicira: parent}
1479 if decoder.Length() < 22 {
1480 return nil, fmt.Errorf("ActionNxBundleLoadInPort packet too short: %d < 22", decoder.Length())
1481 }
1482 _actionnxbundleloadinport.Algorithm = NxBdAlgorithms(decoder.ReadUint16())
1483 _actionnxbundleloadinport.Fields = NxHashFields(decoder.ReadUint16())
1484 _actionnxbundleloadinport.Basis = uint16(decoder.ReadUint16())
1485 _actionnxbundleloadinport.SlaveType = ActionNxBundleSlaveType(decoder.ReadUint32())
1486 _actionnxbundleloadinport.NSlaves = uint16(decoder.ReadUint16())
1487 _actionnxbundleloadinport.OfsNbits = uint16(decoder.ReadUint16())
1488 if obj, err := DecodeOxmId(decoder); err != nil {
1489 return nil, err
1490 } else {
1491 _actionnxbundleloadinport.Dst = obj
1492 }
1493
1494 decoder.Skip(4)
1495
Jonathan Hart828908c2020-04-15 14:23:45 -07001496 end := decoder.Offset() + int(_actionnxbundleloadinport.NSlaves)
1497 for decoder.Offset() < end {
Don Newton98fd8812019-09-23 15:15:02 -04001498 item, err := DecodeActionNxBundleLoadSlave(decoder)
1499 if err != nil {
1500 return nil, err
1501 }
1502 if item != nil {
1503 _actionnxbundleloadinport.InPorts = append(_actionnxbundleloadinport.InPorts, item)
1504 }
1505 }
1506 return _actionnxbundleloadinport, nil
1507}
1508
1509func NewActionNxBundleLoadInPort() *ActionNxBundleLoadInPort {
1510 obj := &ActionNxBundleLoadInPort{
1511 ActionNicira: NewActionNicira(13),
1512 }
1513 return obj
1514}
1515func (self *ActionNxBundleLoadInPort) GetActionName() string {
1516 return "nx_bundle_load_in_port"
1517}
1518
1519func (self *ActionNxBundleLoadInPort) GetActionFields() map[string]interface{} {
1520 return map[string]interface{}{
1521 "Algorithm": self.Algorithm,
1522 "Fields": self.Fields,
1523 "Basis": self.Basis,
1524 "SlaveType": self.SlaveType,
1525 "NSlaves": self.NSlaves,
1526 "OfsNbits": self.OfsNbits,
1527 "Dst": self.Dst,
1528 "InPorts": self.InPorts,
1529 }
1530}
1531
1532func (self *ActionNxBundleLoadInPort) MarshalJSON() ([]byte, error) {
1533 jsonValue, err := json.Marshal(self.GetActionFields())
1534 if err != nil {
1535 return nil, err
1536 }
1537 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1538}
1539
1540type ActionNxClone struct {
1541 *ActionNicira
1542 Actions []goloxi.IAction
1543}
1544
1545type IActionNxClone interface {
1546 IActionNicira
1547 GetActions() []goloxi.IAction
1548}
1549
1550func (self *ActionNxClone) GetActions() []goloxi.IAction {
1551 return self.Actions
1552}
1553
1554func (self *ActionNxClone) SetActions(v []goloxi.IAction) {
1555 self.Actions = v
1556}
1557
1558func (self *ActionNxClone) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001559 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001560 if err := self.ActionNicira.Serialize(encoder); err != nil {
1561 return err
1562 }
1563
1564 encoder.Write(bytes.Repeat([]byte{0}, 6))
1565 for _, obj := range self.Actions {
1566 if err := obj.Serialize(encoder); err != nil {
1567 return err
1568 }
1569 }
Jonathan Hart828908c2020-04-15 14:23:45 -07001570 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001571
Jonathan Hart828908c2020-04-15 14:23:45 -07001572 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001573
1574 return nil
1575}
1576
1577func DecodeActionNxClone(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxClone, error) {
1578 _actionnxclone := &ActionNxClone{ActionNicira: parent}
1579 if decoder.Length() < 6 {
1580 return nil, fmt.Errorf("ActionNxClone packet too short: %d < 6", decoder.Length())
1581 }
1582 decoder.Skip(6)
1583
1584 for decoder.Length() >= 8 {
1585 item, err := DecodeAction(decoder)
1586 if err != nil {
1587 return nil, err
1588 }
1589 if item != nil {
1590 _actionnxclone.Actions = append(_actionnxclone.Actions, item)
1591 }
1592 }
1593 return _actionnxclone, nil
1594}
1595
1596func NewActionNxClone() *ActionNxClone {
1597 obj := &ActionNxClone{
1598 ActionNicira: NewActionNicira(42),
1599 }
1600 return obj
1601}
1602func (self *ActionNxClone) GetActionName() string {
1603 return "nx_clone"
1604}
1605
1606func (self *ActionNxClone) GetActionFields() map[string]interface{} {
1607 return map[string]interface{}{
1608 "Actions": self.Actions,
1609 }
1610}
1611
1612func (self *ActionNxClone) MarshalJSON() ([]byte, error) {
1613 jsonValue, err := json.Marshal(self.GetActionFields())
1614 if err != nil {
1615 return nil, err
1616 }
1617 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1618}
1619
1620type ActionNxConjunction struct {
1621 *ActionNicira
1622 Clause uint8
1623 NClauses uint8
1624 Id uint32
1625}
1626
1627type IActionNxConjunction interface {
1628 IActionNicira
1629 GetClause() uint8
1630 GetNClauses() uint8
1631 GetId() uint32
1632}
1633
1634func (self *ActionNxConjunction) GetClause() uint8 {
1635 return self.Clause
1636}
1637
1638func (self *ActionNxConjunction) SetClause(v uint8) {
1639 self.Clause = v
1640}
1641
1642func (self *ActionNxConjunction) GetNClauses() uint8 {
1643 return self.NClauses
1644}
1645
1646func (self *ActionNxConjunction) SetNClauses(v uint8) {
1647 self.NClauses = v
1648}
1649
1650func (self *ActionNxConjunction) GetId() uint32 {
1651 return self.Id
1652}
1653
1654func (self *ActionNxConjunction) SetId(v uint32) {
1655 self.Id = v
1656}
1657
1658func (self *ActionNxConjunction) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001659 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001660 if err := self.ActionNicira.Serialize(encoder); err != nil {
1661 return err
1662 }
1663
1664 encoder.PutUint8(uint8(self.Clause))
1665 encoder.PutUint8(uint8(self.NClauses))
1666 encoder.PutUint32(uint32(self.Id))
Jonathan Hart828908c2020-04-15 14:23:45 -07001667 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001668
Jonathan Hart828908c2020-04-15 14:23:45 -07001669 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001670
1671 return nil
1672}
1673
1674func DecodeActionNxConjunction(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxConjunction, error) {
1675 _actionnxconjunction := &ActionNxConjunction{ActionNicira: parent}
1676 if decoder.Length() < 6 {
1677 return nil, fmt.Errorf("ActionNxConjunction packet too short: %d < 6", decoder.Length())
1678 }
1679 _actionnxconjunction.Clause = uint8(decoder.ReadByte())
1680 _actionnxconjunction.NClauses = uint8(decoder.ReadByte())
1681 _actionnxconjunction.Id = uint32(decoder.ReadUint32())
1682 return _actionnxconjunction, nil
1683}
1684
1685func NewActionNxConjunction() *ActionNxConjunction {
1686 obj := &ActionNxConjunction{
1687 ActionNicira: NewActionNicira(34),
1688 }
1689 return obj
1690}
1691func (self *ActionNxConjunction) GetActionName() string {
1692 return "nx_conjunction"
1693}
1694
1695func (self *ActionNxConjunction) GetActionFields() map[string]interface{} {
1696 return map[string]interface{}{
1697 "Clause": self.Clause,
1698 "NClauses": self.NClauses,
1699 "Id": self.Id,
1700 }
1701}
1702
1703func (self *ActionNxConjunction) MarshalJSON() ([]byte, error) {
1704 jsonValue, err := json.Marshal(self.GetActionFields())
1705 if err != nil {
1706 return nil, err
1707 }
1708 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1709}
1710
1711type ActionNxController struct {
1712 *ActionNicira
1713 MaxLen uint16
1714 ControllerId uint16
1715 Reason uint8
1716}
1717
1718type IActionNxController interface {
1719 IActionNicira
1720 GetMaxLen() uint16
1721 GetControllerId() uint16
1722 GetReason() uint8
1723}
1724
1725func (self *ActionNxController) GetMaxLen() uint16 {
1726 return self.MaxLen
1727}
1728
1729func (self *ActionNxController) SetMaxLen(v uint16) {
1730 self.MaxLen = v
1731}
1732
1733func (self *ActionNxController) GetControllerId() uint16 {
1734 return self.ControllerId
1735}
1736
1737func (self *ActionNxController) SetControllerId(v uint16) {
1738 self.ControllerId = v
1739}
1740
1741func (self *ActionNxController) GetReason() uint8 {
1742 return self.Reason
1743}
1744
1745func (self *ActionNxController) SetReason(v uint8) {
1746 self.Reason = v
1747}
1748
1749func (self *ActionNxController) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001750 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001751 if err := self.ActionNicira.Serialize(encoder); err != nil {
1752 return err
1753 }
1754
1755 encoder.PutUint16(uint16(self.MaxLen))
1756 encoder.PutUint16(uint16(self.ControllerId))
1757 encoder.PutUint8(uint8(self.Reason))
1758 encoder.Write(bytes.Repeat([]byte{0}, 1))
Jonathan Hart828908c2020-04-15 14:23:45 -07001759 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001760
Jonathan Hart828908c2020-04-15 14:23:45 -07001761 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001762
1763 return nil
1764}
1765
1766func DecodeActionNxController(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxController, error) {
1767 _actionnxcontroller := &ActionNxController{ActionNicira: parent}
1768 if decoder.Length() < 6 {
1769 return nil, fmt.Errorf("ActionNxController packet too short: %d < 6", decoder.Length())
1770 }
1771 _actionnxcontroller.MaxLen = uint16(decoder.ReadUint16())
1772 _actionnxcontroller.ControllerId = uint16(decoder.ReadUint16())
1773 _actionnxcontroller.Reason = uint8(decoder.ReadByte())
1774 decoder.Skip(1)
1775 return _actionnxcontroller, nil
1776}
1777
1778func NewActionNxController() *ActionNxController {
1779 obj := &ActionNxController{
1780 ActionNicira: NewActionNicira(20),
1781 }
1782 return obj
1783}
1784func (self *ActionNxController) GetActionName() string {
1785 return "nx_controller"
1786}
1787
1788func (self *ActionNxController) GetActionFields() map[string]interface{} {
1789 return map[string]interface{}{
1790 "MaxLen": self.MaxLen,
1791 "ControllerId": self.ControllerId,
1792 "Reason": self.Reason,
1793 }
1794}
1795
1796func (self *ActionNxController) MarshalJSON() ([]byte, error) {
1797 jsonValue, err := json.Marshal(self.GetActionFields())
1798 if err != nil {
1799 return nil, err
1800 }
1801 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1802}
1803
1804type ActionNxController2 struct {
1805 *ActionNicira
1806 Properties []IActionNxController2Property
1807}
1808
1809type IActionNxController2 interface {
1810 IActionNicira
1811 GetProperties() []IActionNxController2Property
1812}
1813
1814func (self *ActionNxController2) GetProperties() []IActionNxController2Property {
1815 return self.Properties
1816}
1817
1818func (self *ActionNxController2) SetProperties(v []IActionNxController2Property) {
1819 self.Properties = v
1820}
1821
1822func (self *ActionNxController2) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001823 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001824 if err := self.ActionNicira.Serialize(encoder); err != nil {
1825 return err
1826 }
1827
1828 encoder.Write(bytes.Repeat([]byte{0}, 6))
1829 for _, obj := range self.Properties {
1830 if err := obj.Serialize(encoder); err != nil {
1831 return err
1832 }
1833 }
Jonathan Hart828908c2020-04-15 14:23:45 -07001834 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001835
Jonathan Hart828908c2020-04-15 14:23:45 -07001836 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001837
1838 return nil
1839}
1840
1841func DecodeActionNxController2(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxController2, error) {
1842 _actionnxcontroller2 := &ActionNxController2{ActionNicira: parent}
1843 if decoder.Length() < 6 {
1844 return nil, fmt.Errorf("ActionNxController2 packet too short: %d < 6", decoder.Length())
1845 }
1846 decoder.Skip(6)
1847
1848 for decoder.Length() >= 2 {
1849 item, err := DecodeActionNxController2Property(decoder)
1850 if err != nil {
1851 return nil, err
1852 }
1853 if item != nil {
1854 _actionnxcontroller2.Properties = append(_actionnxcontroller2.Properties, item)
1855 }
1856 }
1857 return _actionnxcontroller2, nil
1858}
1859
1860func NewActionNxController2() *ActionNxController2 {
1861 obj := &ActionNxController2{
1862 ActionNicira: NewActionNicira(37),
1863 }
1864 return obj
1865}
1866func (self *ActionNxController2) GetActionName() string {
1867 return "nx_controller2"
1868}
1869
1870func (self *ActionNxController2) GetActionFields() map[string]interface{} {
1871 return map[string]interface{}{
1872 "Properties": self.Properties,
1873 }
1874}
1875
1876func (self *ActionNxController2) MarshalJSON() ([]byte, error) {
1877 jsonValue, err := json.Marshal(self.GetActionFields())
1878 if err != nil {
1879 return nil, err
1880 }
1881 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
1882}
1883
1884type ActionNxCt struct {
1885 *ActionNicira
1886 Flags NxConntrackFlags
1887 ZoneSrc goloxi.IOxmId
1888 Value uint16
1889 RecircTable uint8
1890 Alg uint16
1891 Actions []goloxi.IAction
1892}
1893
1894type IActionNxCt interface {
1895 IActionNicira
1896 GetFlags() NxConntrackFlags
1897 GetZoneSrc() goloxi.IOxmId
1898 GetValue() uint16
1899 GetRecircTable() uint8
1900 GetAlg() uint16
1901 GetActions() []goloxi.IAction
1902}
1903
1904func (self *ActionNxCt) GetFlags() NxConntrackFlags {
1905 return self.Flags
1906}
1907
1908func (self *ActionNxCt) SetFlags(v NxConntrackFlags) {
1909 self.Flags = v
1910}
1911
1912func (self *ActionNxCt) GetZoneSrc() goloxi.IOxmId {
1913 return self.ZoneSrc
1914}
1915
1916func (self *ActionNxCt) SetZoneSrc(v goloxi.IOxmId) {
1917 self.ZoneSrc = v
1918}
1919
1920func (self *ActionNxCt) GetValue() uint16 {
1921 return self.Value
1922}
1923
1924func (self *ActionNxCt) SetValue(v uint16) {
1925 self.Value = v
1926}
1927
1928func (self *ActionNxCt) GetRecircTable() uint8 {
1929 return self.RecircTable
1930}
1931
1932func (self *ActionNxCt) SetRecircTable(v uint8) {
1933 self.RecircTable = v
1934}
1935
1936func (self *ActionNxCt) GetAlg() uint16 {
1937 return self.Alg
1938}
1939
1940func (self *ActionNxCt) SetAlg(v uint16) {
1941 self.Alg = v
1942}
1943
1944func (self *ActionNxCt) GetActions() []goloxi.IAction {
1945 return self.Actions
1946}
1947
1948func (self *ActionNxCt) SetActions(v []goloxi.IAction) {
1949 self.Actions = v
1950}
1951
1952func (self *ActionNxCt) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07001953 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04001954 if err := self.ActionNicira.Serialize(encoder); err != nil {
1955 return err
1956 }
1957
1958 encoder.PutUint16(uint16(self.Flags))
1959 self.ZoneSrc.Serialize(encoder)
1960 encoder.PutUint16(uint16(self.Value))
1961 encoder.PutUint8(uint8(self.RecircTable))
1962 encoder.Write(bytes.Repeat([]byte{0}, 3))
1963 encoder.PutUint16(uint16(self.Alg))
1964 for _, obj := range self.Actions {
1965 if err := obj.Serialize(encoder); err != nil {
1966 return err
1967 }
1968 }
Jonathan Hart828908c2020-04-15 14:23:45 -07001969 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04001970
Jonathan Hart828908c2020-04-15 14:23:45 -07001971 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04001972
1973 return nil
1974}
1975
1976func DecodeActionNxCt(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxCt, error) {
1977 _actionnxct := &ActionNxCt{ActionNicira: parent}
1978 if decoder.Length() < 14 {
1979 return nil, fmt.Errorf("ActionNxCt packet too short: %d < 14", decoder.Length())
1980 }
1981 _actionnxct.Flags = NxConntrackFlags(decoder.ReadUint16())
1982 if obj, err := DecodeOxmId(decoder); err != nil {
1983 return nil, err
1984 } else {
1985 _actionnxct.ZoneSrc = obj
1986 }
1987
1988 _actionnxct.Value = uint16(decoder.ReadUint16())
1989 _actionnxct.RecircTable = uint8(decoder.ReadByte())
1990 decoder.Skip(3)
1991 _actionnxct.Alg = uint16(decoder.ReadUint16())
1992
1993 for decoder.Length() >= 8 {
1994 item, err := DecodeAction(decoder)
1995 if err != nil {
1996 return nil, err
1997 }
1998 if item != nil {
1999 _actionnxct.Actions = append(_actionnxct.Actions, item)
2000 }
2001 }
2002 return _actionnxct, nil
2003}
2004
2005func NewActionNxCt() *ActionNxCt {
2006 obj := &ActionNxCt{
2007 ActionNicira: NewActionNicira(35),
2008 }
2009 return obj
2010}
2011func (self *ActionNxCt) GetActionName() string {
2012 return "nx_ct"
2013}
2014
2015func (self *ActionNxCt) GetActionFields() map[string]interface{} {
2016 return map[string]interface{}{
2017 "Flags": self.Flags,
2018 "ZoneSrc": self.ZoneSrc,
2019 "Value": self.Value,
2020 "RecircTable": self.RecircTable,
2021 "Alg": self.Alg,
2022 "Actions": self.Actions,
2023 }
2024}
2025
2026func (self *ActionNxCt) MarshalJSON() ([]byte, error) {
2027 jsonValue, err := json.Marshal(self.GetActionFields())
2028 if err != nil {
2029 return nil, err
2030 }
2031 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2032}
2033
2034type ActionNxCtClear struct {
2035 *ActionNicira
2036}
2037
2038type IActionNxCtClear interface {
2039 IActionNicira
2040}
2041
2042func (self *ActionNxCtClear) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002043 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002044 if err := self.ActionNicira.Serialize(encoder); err != nil {
2045 return err
2046 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002047 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002048
Jonathan Hart828908c2020-04-15 14:23:45 -07002049 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002050
2051 return nil
2052}
2053
2054func DecodeActionNxCtClear(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxCtClear, error) {
2055 _actionnxctclear := &ActionNxCtClear{ActionNicira: parent}
2056 return _actionnxctclear, nil
2057}
2058
2059func NewActionNxCtClear() *ActionNxCtClear {
2060 obj := &ActionNxCtClear{
2061 ActionNicira: NewActionNicira(43),
2062 }
2063 return obj
2064}
2065func (self *ActionNxCtClear) GetActionName() string {
2066 return "nx_ct_clear"
2067}
2068
2069func (self *ActionNxCtClear) GetActionFields() map[string]interface{} {
2070 return map[string]interface{}{}
2071}
2072
2073func (self *ActionNxCtClear) MarshalJSON() ([]byte, error) {
2074 jsonValue, err := json.Marshal(self.GetActionFields())
2075 if err != nil {
2076 return nil, err
2077 }
2078 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2079}
2080
2081type ActionNxDebugRecirc struct {
2082 *ActionNicira
2083}
2084
2085type IActionNxDebugRecirc interface {
2086 IActionNicira
2087}
2088
2089func (self *ActionNxDebugRecirc) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002090 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002091 if err := self.ActionNicira.Serialize(encoder); err != nil {
2092 return err
2093 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002094 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002095
Jonathan Hart828908c2020-04-15 14:23:45 -07002096 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002097
2098 return nil
2099}
2100
2101func DecodeActionNxDebugRecirc(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxDebugRecirc, error) {
2102 _actionnxdebugrecirc := &ActionNxDebugRecirc{ActionNicira: parent}
2103 return _actionnxdebugrecirc, nil
2104}
2105
2106func NewActionNxDebugRecirc() *ActionNxDebugRecirc {
2107 obj := &ActionNxDebugRecirc{
2108 ActionNicira: NewActionNicira(255),
2109 }
2110 return obj
2111}
2112func (self *ActionNxDebugRecirc) GetActionName() string {
2113 return "nx_debug_recirc"
2114}
2115
2116func (self *ActionNxDebugRecirc) GetActionFields() map[string]interface{} {
2117 return map[string]interface{}{}
2118}
2119
2120func (self *ActionNxDebugRecirc) MarshalJSON() ([]byte, error) {
2121 jsonValue, err := json.Marshal(self.GetActionFields())
2122 if err != nil {
2123 return nil, err
2124 }
2125 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2126}
2127
2128type ActionNxDebugSlow struct {
2129 *ActionNicira
2130}
2131
2132type IActionNxDebugSlow interface {
2133 IActionNicira
2134}
2135
2136func (self *ActionNxDebugSlow) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002137 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002138 if err := self.ActionNicira.Serialize(encoder); err != nil {
2139 return err
2140 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002141 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002142
Jonathan Hart828908c2020-04-15 14:23:45 -07002143 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002144
2145 return nil
2146}
2147
2148func DecodeActionNxDebugSlow(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxDebugSlow, error) {
2149 _actionnxdebugslow := &ActionNxDebugSlow{ActionNicira: parent}
2150 return _actionnxdebugslow, nil
2151}
2152
2153func NewActionNxDebugSlow() *ActionNxDebugSlow {
2154 obj := &ActionNxDebugSlow{
2155 ActionNicira: NewActionNicira(254),
2156 }
2157 return obj
2158}
2159func (self *ActionNxDebugSlow) GetActionName() string {
2160 return "nx_debug_slow"
2161}
2162
2163func (self *ActionNxDebugSlow) GetActionFields() map[string]interface{} {
2164 return map[string]interface{}{}
2165}
2166
2167func (self *ActionNxDebugSlow) MarshalJSON() ([]byte, error) {
2168 jsonValue, err := json.Marshal(self.GetActionFields())
2169 if err != nil {
2170 return nil, err
2171 }
2172 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2173}
2174
2175type ActionNxDecMplsTtl struct {
2176 *ActionNicira
2177}
2178
2179type IActionNxDecMplsTtl interface {
2180 IActionNicira
2181}
2182
2183func (self *ActionNxDecMplsTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002184 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002185 if err := self.ActionNicira.Serialize(encoder); err != nil {
2186 return err
2187 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002188 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002189
Jonathan Hart828908c2020-04-15 14:23:45 -07002190 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002191
2192 return nil
2193}
2194
2195func DecodeActionNxDecMplsTtl(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxDecMplsTtl, error) {
2196 _actionnxdecmplsttl := &ActionNxDecMplsTtl{ActionNicira: parent}
2197 return _actionnxdecmplsttl, nil
2198}
2199
2200func NewActionNxDecMplsTtl() *ActionNxDecMplsTtl {
2201 obj := &ActionNxDecMplsTtl{
2202 ActionNicira: NewActionNicira(26),
2203 }
2204 return obj
2205}
2206func (self *ActionNxDecMplsTtl) GetActionName() string {
2207 return "nx_dec_mpls_ttl"
2208}
2209
2210func (self *ActionNxDecMplsTtl) GetActionFields() map[string]interface{} {
2211 return map[string]interface{}{}
2212}
2213
2214func (self *ActionNxDecMplsTtl) MarshalJSON() ([]byte, error) {
2215 jsonValue, err := json.Marshal(self.GetActionFields())
2216 if err != nil {
2217 return nil, err
2218 }
2219 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2220}
2221
2222type ActionNxDecNshTtl struct {
2223 *ActionNicira
2224}
2225
2226type IActionNxDecNshTtl interface {
2227 IActionNicira
2228}
2229
2230func (self *ActionNxDecNshTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002231 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002232 if err := self.ActionNicira.Serialize(encoder); err != nil {
2233 return err
2234 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002235 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002236
Jonathan Hart828908c2020-04-15 14:23:45 -07002237 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002238
2239 return nil
2240}
2241
2242func DecodeActionNxDecNshTtl(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxDecNshTtl, error) {
2243 _actionnxdecnshttl := &ActionNxDecNshTtl{ActionNicira: parent}
2244 return _actionnxdecnshttl, nil
2245}
2246
2247func NewActionNxDecNshTtl() *ActionNxDecNshTtl {
2248 obj := &ActionNxDecNshTtl{
2249 ActionNicira: NewActionNicira(48),
2250 }
2251 return obj
2252}
2253func (self *ActionNxDecNshTtl) GetActionName() string {
2254 return "nx_dec_nsh_ttl"
2255}
2256
2257func (self *ActionNxDecNshTtl) GetActionFields() map[string]interface{} {
2258 return map[string]interface{}{}
2259}
2260
2261func (self *ActionNxDecNshTtl) MarshalJSON() ([]byte, error) {
2262 jsonValue, err := json.Marshal(self.GetActionFields())
2263 if err != nil {
2264 return nil, err
2265 }
2266 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2267}
2268
2269type ActionNxDecTtlCntIds struct {
2270 *ActionNicira
2271 NControllers uint16
2272}
2273
2274type IActionNxDecTtlCntIds interface {
2275 IActionNicira
2276 GetNControllers() uint16
2277}
2278
2279func (self *ActionNxDecTtlCntIds) GetNControllers() uint16 {
2280 return self.NControllers
2281}
2282
2283func (self *ActionNxDecTtlCntIds) SetNControllers(v uint16) {
2284 self.NControllers = v
2285}
2286
2287func (self *ActionNxDecTtlCntIds) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002288 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002289 if err := self.ActionNicira.Serialize(encoder); err != nil {
2290 return err
2291 }
2292
2293 encoder.PutUint16(uint16(self.NControllers))
2294 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -07002295 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002296
Jonathan Hart828908c2020-04-15 14:23:45 -07002297 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002298
2299 return nil
2300}
2301
2302func DecodeActionNxDecTtlCntIds(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxDecTtlCntIds, error) {
2303 _actionnxdecttlcntids := &ActionNxDecTtlCntIds{ActionNicira: parent}
2304 if decoder.Length() < 6 {
2305 return nil, fmt.Errorf("ActionNxDecTtlCntIds packet too short: %d < 6", decoder.Length())
2306 }
2307 _actionnxdecttlcntids.NControllers = uint16(decoder.ReadUint16())
2308 decoder.Skip(4)
2309 return _actionnxdecttlcntids, nil
2310}
2311
2312func NewActionNxDecTtlCntIds() *ActionNxDecTtlCntIds {
2313 obj := &ActionNxDecTtlCntIds{
2314 ActionNicira: NewActionNicira(21),
2315 }
2316 return obj
2317}
2318func (self *ActionNxDecTtlCntIds) GetActionName() string {
2319 return "nx_dec_ttl_cnt_ids"
2320}
2321
2322func (self *ActionNxDecTtlCntIds) GetActionFields() map[string]interface{} {
2323 return map[string]interface{}{
2324 "NControllers": self.NControllers,
2325 }
2326}
2327
2328func (self *ActionNxDecTtlCntIds) MarshalJSON() ([]byte, error) {
2329 jsonValue, err := json.Marshal(self.GetActionFields())
2330 if err != nil {
2331 return nil, err
2332 }
2333 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2334}
2335
2336type ActionNxDecap struct {
2337 *ActionNicira
2338 NewPktType uint32
2339}
2340
2341type IActionNxDecap interface {
2342 IActionNicira
2343 GetNewPktType() uint32
2344}
2345
2346func (self *ActionNxDecap) GetNewPktType() uint32 {
2347 return self.NewPktType
2348}
2349
2350func (self *ActionNxDecap) SetNewPktType(v uint32) {
2351 self.NewPktType = v
2352}
2353
2354func (self *ActionNxDecap) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002355 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002356 if err := self.ActionNicira.Serialize(encoder); err != nil {
2357 return err
2358 }
2359
2360 encoder.Write(bytes.Repeat([]byte{0}, 2))
2361 encoder.PutUint32(uint32(self.NewPktType))
Jonathan Hart828908c2020-04-15 14:23:45 -07002362 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002363
Jonathan Hart828908c2020-04-15 14:23:45 -07002364 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002365
2366 return nil
2367}
2368
2369func DecodeActionNxDecap(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxDecap, error) {
2370 _actionnxdecap := &ActionNxDecap{ActionNicira: parent}
2371 if decoder.Length() < 6 {
2372 return nil, fmt.Errorf("ActionNxDecap packet too short: %d < 6", decoder.Length())
2373 }
2374 decoder.Skip(2)
2375 _actionnxdecap.NewPktType = uint32(decoder.ReadUint32())
2376 return _actionnxdecap, nil
2377}
2378
2379func NewActionNxDecap() *ActionNxDecap {
2380 obj := &ActionNxDecap{
2381 ActionNicira: NewActionNicira(47),
2382 }
2383 return obj
2384}
2385func (self *ActionNxDecap) GetActionName() string {
2386 return "nx_decap"
2387}
2388
2389func (self *ActionNxDecap) GetActionFields() map[string]interface{} {
2390 return map[string]interface{}{
2391 "NewPktType": self.NewPktType,
2392 }
2393}
2394
2395func (self *ActionNxDecap) MarshalJSON() ([]byte, error) {
2396 jsonValue, err := json.Marshal(self.GetActionFields())
2397 if err != nil {
2398 return nil, err
2399 }
2400 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2401}
2402
2403type ActionNxEncap struct {
2404 *ActionNicira
2405 HdrSize uint16
2406 PacketType PacketType
2407 Props []IEdPropHeader
2408}
2409
2410type IActionNxEncap interface {
2411 IActionNicira
2412 GetHdrSize() uint16
2413 GetPacketType() PacketType
2414 GetProps() []IEdPropHeader
2415}
2416
2417func (self *ActionNxEncap) GetHdrSize() uint16 {
2418 return self.HdrSize
2419}
2420
2421func (self *ActionNxEncap) SetHdrSize(v uint16) {
2422 self.HdrSize = v
2423}
2424
2425func (self *ActionNxEncap) GetPacketType() PacketType {
2426 return self.PacketType
2427}
2428
2429func (self *ActionNxEncap) SetPacketType(v PacketType) {
2430 self.PacketType = v
2431}
2432
2433func (self *ActionNxEncap) GetProps() []IEdPropHeader {
2434 return self.Props
2435}
2436
2437func (self *ActionNxEncap) SetProps(v []IEdPropHeader) {
2438 self.Props = v
2439}
2440
2441func (self *ActionNxEncap) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002442 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002443 if err := self.ActionNicira.Serialize(encoder); err != nil {
2444 return err
2445 }
2446
2447 encoder.PutUint16(uint16(self.HdrSize))
2448 encoder.PutUint32(uint32(self.PacketType))
2449 for _, obj := range self.Props {
2450 if err := obj.Serialize(encoder); err != nil {
2451 return err
2452 }
2453 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002454 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002455
Jonathan Hart828908c2020-04-15 14:23:45 -07002456 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002457
2458 return nil
2459}
2460
2461func DecodeActionNxEncap(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxEncap, error) {
2462 _actionnxencap := &ActionNxEncap{ActionNicira: parent}
2463 if decoder.Length() < 6 {
2464 return nil, fmt.Errorf("ActionNxEncap packet too short: %d < 6", decoder.Length())
2465 }
2466 _actionnxencap.HdrSize = uint16(decoder.ReadUint16())
2467 _actionnxencap.PacketType = PacketType(decoder.ReadUint32())
2468
2469 for decoder.Length() >= 4 {
2470 item, err := DecodeEdPropHeader(decoder)
2471 if err != nil {
2472 return nil, err
2473 }
2474 if item != nil {
2475 _actionnxencap.Props = append(_actionnxencap.Props, item)
2476 }
2477 }
2478 return _actionnxencap, nil
2479}
2480
2481func NewActionNxEncap() *ActionNxEncap {
2482 obj := &ActionNxEncap{
2483 ActionNicira: NewActionNicira(46),
2484 }
2485 return obj
2486}
2487func (self *ActionNxEncap) GetActionName() string {
2488 return "nx_encap"
2489}
2490
2491func (self *ActionNxEncap) GetActionFields() map[string]interface{} {
2492 return map[string]interface{}{
2493 "HdrSize": self.HdrSize,
2494 "PacketType": self.PacketType,
2495 "Props": self.Props,
2496 }
2497}
2498
2499func (self *ActionNxEncap) MarshalJSON() ([]byte, error) {
2500 jsonValue, err := json.Marshal(self.GetActionFields())
2501 if err != nil {
2502 return nil, err
2503 }
2504 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2505}
2506
2507type ActionNxExit struct {
2508 *ActionNicira
2509}
2510
2511type IActionNxExit interface {
2512 IActionNicira
2513}
2514
2515func (self *ActionNxExit) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002516 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002517 if err := self.ActionNicira.Serialize(encoder); err != nil {
2518 return err
2519 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002520 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002521
Jonathan Hart828908c2020-04-15 14:23:45 -07002522 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002523
2524 return nil
2525}
2526
2527func DecodeActionNxExit(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxExit, error) {
2528 _actionnxexit := &ActionNxExit{ActionNicira: parent}
2529 return _actionnxexit, nil
2530}
2531
2532func NewActionNxExit() *ActionNxExit {
2533 obj := &ActionNxExit{
2534 ActionNicira: NewActionNicira(17),
2535 }
2536 return obj
2537}
2538func (self *ActionNxExit) GetActionName() string {
2539 return "nx_exit"
2540}
2541
2542func (self *ActionNxExit) GetActionFields() map[string]interface{} {
2543 return map[string]interface{}{}
2544}
2545
2546func (self *ActionNxExit) MarshalJSON() ([]byte, error) {
2547 jsonValue, err := json.Marshal(self.GetActionFields())
2548 if err != nil {
2549 return nil, err
2550 }
2551 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2552}
2553
2554type ActionNxFinTimeout struct {
2555 *ActionNicira
2556 FinIdleTimeout uint16
2557 FinHardTimeout uint16
2558}
2559
2560type IActionNxFinTimeout interface {
2561 IActionNicira
2562 GetFinIdleTimeout() uint16
2563 GetFinHardTimeout() uint16
2564}
2565
2566func (self *ActionNxFinTimeout) GetFinIdleTimeout() uint16 {
2567 return self.FinIdleTimeout
2568}
2569
2570func (self *ActionNxFinTimeout) SetFinIdleTimeout(v uint16) {
2571 self.FinIdleTimeout = v
2572}
2573
2574func (self *ActionNxFinTimeout) GetFinHardTimeout() uint16 {
2575 return self.FinHardTimeout
2576}
2577
2578func (self *ActionNxFinTimeout) SetFinHardTimeout(v uint16) {
2579 self.FinHardTimeout = v
2580}
2581
2582func (self *ActionNxFinTimeout) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002583 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002584 if err := self.ActionNicira.Serialize(encoder); err != nil {
2585 return err
2586 }
2587
2588 encoder.PutUint16(uint16(self.FinIdleTimeout))
2589 encoder.PutUint16(uint16(self.FinHardTimeout))
2590 encoder.Write(bytes.Repeat([]byte{0}, 2))
Jonathan Hart828908c2020-04-15 14:23:45 -07002591 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002592
Jonathan Hart828908c2020-04-15 14:23:45 -07002593 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002594
2595 return nil
2596}
2597
2598func DecodeActionNxFinTimeout(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxFinTimeout, error) {
2599 _actionnxfintimeout := &ActionNxFinTimeout{ActionNicira: parent}
2600 if decoder.Length() < 6 {
2601 return nil, fmt.Errorf("ActionNxFinTimeout packet too short: %d < 6", decoder.Length())
2602 }
2603 _actionnxfintimeout.FinIdleTimeout = uint16(decoder.ReadUint16())
2604 _actionnxfintimeout.FinHardTimeout = uint16(decoder.ReadUint16())
2605 decoder.Skip(2)
2606 return _actionnxfintimeout, nil
2607}
2608
2609func NewActionNxFinTimeout() *ActionNxFinTimeout {
2610 obj := &ActionNxFinTimeout{
2611 ActionNicira: NewActionNicira(19),
2612 }
2613 return obj
2614}
2615func (self *ActionNxFinTimeout) GetActionName() string {
2616 return "nx_fin_timeout"
2617}
2618
2619func (self *ActionNxFinTimeout) GetActionFields() map[string]interface{} {
2620 return map[string]interface{}{
2621 "FinIdleTimeout": self.FinIdleTimeout,
2622 "FinHardTimeout": self.FinHardTimeout,
2623 }
2624}
2625
2626func (self *ActionNxFinTimeout) MarshalJSON() ([]byte, error) {
2627 jsonValue, err := json.Marshal(self.GetActionFields())
2628 if err != nil {
2629 return nil, err
2630 }
2631 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2632}
2633
2634type ActionNxGroup struct {
2635 *ActionNicira
2636 Value uint32
2637}
2638
2639type IActionNxGroup interface {
2640 IActionNicira
2641 GetValue() uint32
2642}
2643
2644func (self *ActionNxGroup) GetValue() uint32 {
2645 return self.Value
2646}
2647
2648func (self *ActionNxGroup) SetValue(v uint32) {
2649 self.Value = v
2650}
2651
2652func (self *ActionNxGroup) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002653 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002654 if err := self.ActionNicira.Serialize(encoder); err != nil {
2655 return err
2656 }
2657
2658 encoder.PutUint32(uint32(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07002659 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002660
Jonathan Hart828908c2020-04-15 14:23:45 -07002661 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002662
2663 return nil
2664}
2665
2666func DecodeActionNxGroup(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxGroup, error) {
2667 _actionnxgroup := &ActionNxGroup{ActionNicira: parent}
2668 if decoder.Length() < 4 {
2669 return nil, fmt.Errorf("ActionNxGroup packet too short: %d < 4", decoder.Length())
2670 }
2671 _actionnxgroup.Value = uint32(decoder.ReadUint32())
2672 return _actionnxgroup, nil
2673}
2674
2675func NewActionNxGroup() *ActionNxGroup {
2676 obj := &ActionNxGroup{
2677 ActionNicira: NewActionNicira(40),
2678 }
2679 return obj
2680}
2681func (self *ActionNxGroup) GetActionName() string {
2682 return "nx_group"
2683}
2684
2685func (self *ActionNxGroup) GetActionFields() map[string]interface{} {
2686 return map[string]interface{}{
2687 "Value": self.Value,
2688 }
2689}
2690
2691func (self *ActionNxGroup) MarshalJSON() ([]byte, error) {
2692 jsonValue, err := json.Marshal(self.GetActionFields())
2693 if err != nil {
2694 return nil, err
2695 }
2696 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2697}
2698
2699type ActionNxLearn struct {
2700 *ActionNicira
2701 IdleTimeout uint16
2702 HardTimeout uint16
2703 Priority uint16
2704 Cookie uint64
2705 Flags uint16
2706 TableId uint8
2707 FinIdleTimeout uint16
2708 FinHardTimeout uint16
2709 FlowMods []IFlowModSpec
2710}
2711
2712type IActionNxLearn interface {
2713 IActionNicira
2714 GetIdleTimeout() uint16
2715 GetHardTimeout() uint16
2716 GetPriority() uint16
2717 GetCookie() uint64
2718 GetFlags() uint16
2719 GetTableId() uint8
2720 GetFinIdleTimeout() uint16
2721 GetFinHardTimeout() uint16
2722 GetFlowMods() []IFlowModSpec
2723}
2724
2725func (self *ActionNxLearn) GetIdleTimeout() uint16 {
2726 return self.IdleTimeout
2727}
2728
2729func (self *ActionNxLearn) SetIdleTimeout(v uint16) {
2730 self.IdleTimeout = v
2731}
2732
2733func (self *ActionNxLearn) GetHardTimeout() uint16 {
2734 return self.HardTimeout
2735}
2736
2737func (self *ActionNxLearn) SetHardTimeout(v uint16) {
2738 self.HardTimeout = v
2739}
2740
2741func (self *ActionNxLearn) GetPriority() uint16 {
2742 return self.Priority
2743}
2744
2745func (self *ActionNxLearn) SetPriority(v uint16) {
2746 self.Priority = v
2747}
2748
2749func (self *ActionNxLearn) GetCookie() uint64 {
2750 return self.Cookie
2751}
2752
2753func (self *ActionNxLearn) SetCookie(v uint64) {
2754 self.Cookie = v
2755}
2756
2757func (self *ActionNxLearn) GetFlags() uint16 {
2758 return self.Flags
2759}
2760
2761func (self *ActionNxLearn) SetFlags(v uint16) {
2762 self.Flags = v
2763}
2764
2765func (self *ActionNxLearn) GetTableId() uint8 {
2766 return self.TableId
2767}
2768
2769func (self *ActionNxLearn) SetTableId(v uint8) {
2770 self.TableId = v
2771}
2772
2773func (self *ActionNxLearn) GetFinIdleTimeout() uint16 {
2774 return self.FinIdleTimeout
2775}
2776
2777func (self *ActionNxLearn) SetFinIdleTimeout(v uint16) {
2778 self.FinIdleTimeout = v
2779}
2780
2781func (self *ActionNxLearn) GetFinHardTimeout() uint16 {
2782 return self.FinHardTimeout
2783}
2784
2785func (self *ActionNxLearn) SetFinHardTimeout(v uint16) {
2786 self.FinHardTimeout = v
2787}
2788
2789func (self *ActionNxLearn) GetFlowMods() []IFlowModSpec {
2790 return self.FlowMods
2791}
2792
2793func (self *ActionNxLearn) SetFlowMods(v []IFlowModSpec) {
2794 self.FlowMods = v
2795}
2796
2797func (self *ActionNxLearn) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002798 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002799 if err := self.ActionNicira.Serialize(encoder); err != nil {
2800 return err
2801 }
2802
2803 encoder.PutUint16(uint16(self.IdleTimeout))
2804 encoder.PutUint16(uint16(self.HardTimeout))
2805 encoder.PutUint16(uint16(self.Priority))
2806 encoder.PutUint64(uint64(self.Cookie))
2807 encoder.PutUint16(uint16(self.Flags))
2808 encoder.PutUint8(uint8(self.TableId))
2809 encoder.Write(bytes.Repeat([]byte{0}, 1))
2810 encoder.PutUint16(uint16(self.FinIdleTimeout))
2811 encoder.PutUint16(uint16(self.FinHardTimeout))
2812 for _, obj := range self.FlowMods {
2813 if err := obj.Serialize(encoder); err != nil {
2814 return err
2815 }
2816 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002817 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002818
Jonathan Hart828908c2020-04-15 14:23:45 -07002819 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002820
2821 return nil
2822}
2823
2824func DecodeActionNxLearn(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxLearn, error) {
2825 _actionnxlearn := &ActionNxLearn{ActionNicira: parent}
2826 if decoder.Length() < 22 {
2827 return nil, fmt.Errorf("ActionNxLearn packet too short: %d < 22", decoder.Length())
2828 }
2829 _actionnxlearn.IdleTimeout = uint16(decoder.ReadUint16())
2830 _actionnxlearn.HardTimeout = uint16(decoder.ReadUint16())
2831 _actionnxlearn.Priority = uint16(decoder.ReadUint16())
2832 _actionnxlearn.Cookie = uint64(decoder.ReadUint64())
2833 _actionnxlearn.Flags = uint16(decoder.ReadUint16())
2834 _actionnxlearn.TableId = uint8(decoder.ReadByte())
2835 decoder.Skip(1)
2836 _actionnxlearn.FinIdleTimeout = uint16(decoder.ReadUint16())
2837 _actionnxlearn.FinHardTimeout = uint16(decoder.ReadUint16())
2838
2839 for decoder.Length() >= 2 {
2840 item, err := DecodeFlowModSpec(decoder)
2841 if err != nil {
2842 return nil, err
2843 }
2844 if item != nil {
2845 _actionnxlearn.FlowMods = append(_actionnxlearn.FlowMods, item)
2846 }
2847 }
2848 return _actionnxlearn, nil
2849}
2850
2851func NewActionNxLearn() *ActionNxLearn {
2852 obj := &ActionNxLearn{
2853 ActionNicira: NewActionNicira(16),
2854 }
2855 return obj
2856}
2857func (self *ActionNxLearn) GetActionName() string {
2858 return "nx_learn"
2859}
2860
2861func (self *ActionNxLearn) GetActionFields() map[string]interface{} {
2862 return map[string]interface{}{
2863 "IdleTimeout": self.IdleTimeout,
2864 "HardTimeout": self.HardTimeout,
2865 "Priority": self.Priority,
2866 "Cookie": self.Cookie,
2867 "Flags": self.Flags,
2868 "TableId": self.TableId,
2869 "FinIdleTimeout": self.FinIdleTimeout,
2870 "FinHardTimeout": self.FinHardTimeout,
2871 "FlowMods": self.FlowMods,
2872 }
2873}
2874
2875func (self *ActionNxLearn) MarshalJSON() ([]byte, error) {
2876 jsonValue, err := json.Marshal(self.GetActionFields())
2877 if err != nil {
2878 return nil, err
2879 }
2880 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2881}
2882
2883type ActionNxLearn2 struct {
2884 *ActionNicira
2885}
2886
2887type IActionNxLearn2 interface {
2888 IActionNicira
2889}
2890
2891func (self *ActionNxLearn2) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07002892 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04002893 if err := self.ActionNicira.Serialize(encoder); err != nil {
2894 return err
2895 }
Jonathan Hart828908c2020-04-15 14:23:45 -07002896 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04002897
Jonathan Hart828908c2020-04-15 14:23:45 -07002898 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04002899
2900 return nil
2901}
2902
2903func DecodeActionNxLearn2(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxLearn2, error) {
2904 _actionnxlearn2 := &ActionNxLearn2{ActionNicira: parent}
2905 return _actionnxlearn2, nil
2906}
2907
2908func NewActionNxLearn2() *ActionNxLearn2 {
2909 obj := &ActionNxLearn2{
2910 ActionNicira: NewActionNicira(45),
2911 }
2912 return obj
2913}
2914func (self *ActionNxLearn2) GetActionName() string {
2915 return "nx_learn2"
2916}
2917
2918func (self *ActionNxLearn2) GetActionFields() map[string]interface{} {
2919 return map[string]interface{}{}
2920}
2921
2922func (self *ActionNxLearn2) MarshalJSON() ([]byte, error) {
2923 jsonValue, err := json.Marshal(self.GetActionFields())
2924 if err != nil {
2925 return nil, err
2926 }
2927 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
2928}
2929
2930type ActionNxMultipath struct {
2931 *ActionNicira
2932 Fields NxHashFields
2933 Basis uint16
2934 Algorithm NxMpAlgorithm
2935 MaxLink uint16
2936 Arg uint32
2937 OfsNbits uint16
2938 Dst goloxi.IOxmId
2939}
2940
2941type IActionNxMultipath interface {
2942 IActionNicira
2943 GetFields() NxHashFields
2944 GetBasis() uint16
2945 GetAlgorithm() NxMpAlgorithm
2946 GetMaxLink() uint16
2947 GetArg() uint32
2948 GetOfsNbits() uint16
2949 GetDst() goloxi.IOxmId
2950}
2951
2952func (self *ActionNxMultipath) GetFields() NxHashFields {
2953 return self.Fields
2954}
2955
2956func (self *ActionNxMultipath) SetFields(v NxHashFields) {
2957 self.Fields = v
2958}
2959
2960func (self *ActionNxMultipath) GetBasis() uint16 {
2961 return self.Basis
2962}
2963
2964func (self *ActionNxMultipath) SetBasis(v uint16) {
2965 self.Basis = v
2966}
2967
2968func (self *ActionNxMultipath) GetAlgorithm() NxMpAlgorithm {
2969 return self.Algorithm
2970}
2971
2972func (self *ActionNxMultipath) SetAlgorithm(v NxMpAlgorithm) {
2973 self.Algorithm = v
2974}
2975
2976func (self *ActionNxMultipath) GetMaxLink() uint16 {
2977 return self.MaxLink
2978}
2979
2980func (self *ActionNxMultipath) SetMaxLink(v uint16) {
2981 self.MaxLink = v
2982}
2983
2984func (self *ActionNxMultipath) GetArg() uint32 {
2985 return self.Arg
2986}
2987
2988func (self *ActionNxMultipath) SetArg(v uint32) {
2989 self.Arg = v
2990}
2991
2992func (self *ActionNxMultipath) GetOfsNbits() uint16 {
2993 return self.OfsNbits
2994}
2995
2996func (self *ActionNxMultipath) SetOfsNbits(v uint16) {
2997 self.OfsNbits = v
2998}
2999
3000func (self *ActionNxMultipath) GetDst() goloxi.IOxmId {
3001 return self.Dst
3002}
3003
3004func (self *ActionNxMultipath) SetDst(v goloxi.IOxmId) {
3005 self.Dst = v
3006}
3007
3008func (self *ActionNxMultipath) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003009 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003010 if err := self.ActionNicira.Serialize(encoder); err != nil {
3011 return err
3012 }
3013
3014 encoder.PutUint16(uint16(self.Fields))
3015 encoder.PutUint16(uint16(self.Basis))
3016 encoder.Write(bytes.Repeat([]byte{0}, 2))
3017 encoder.PutUint16(uint16(self.Algorithm))
3018 encoder.PutUint16(uint16(self.MaxLink))
3019 encoder.PutUint32(uint32(self.Arg))
3020 encoder.Write(bytes.Repeat([]byte{0}, 2))
3021 encoder.PutUint16(uint16(self.OfsNbits))
3022 self.Dst.Serialize(encoder)
Jonathan Hart828908c2020-04-15 14:23:45 -07003023 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003024
Jonathan Hart828908c2020-04-15 14:23:45 -07003025 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003026
3027 return nil
3028}
3029
3030func DecodeActionNxMultipath(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxMultipath, error) {
3031 _actionnxmultipath := &ActionNxMultipath{ActionNicira: parent}
3032 if decoder.Length() < 22 {
3033 return nil, fmt.Errorf("ActionNxMultipath packet too short: %d < 22", decoder.Length())
3034 }
3035 _actionnxmultipath.Fields = NxHashFields(decoder.ReadUint16())
3036 _actionnxmultipath.Basis = uint16(decoder.ReadUint16())
3037 decoder.Skip(2)
3038 _actionnxmultipath.Algorithm = NxMpAlgorithm(decoder.ReadUint16())
3039 _actionnxmultipath.MaxLink = uint16(decoder.ReadUint16())
3040 _actionnxmultipath.Arg = uint32(decoder.ReadUint32())
3041 decoder.Skip(2)
3042 _actionnxmultipath.OfsNbits = uint16(decoder.ReadUint16())
3043 if obj, err := DecodeOxmId(decoder); err != nil {
3044 return nil, err
3045 } else {
3046 _actionnxmultipath.Dst = obj
3047 }
3048
3049 return _actionnxmultipath, nil
3050}
3051
3052func NewActionNxMultipath() *ActionNxMultipath {
3053 obj := &ActionNxMultipath{
3054 ActionNicira: NewActionNicira(10),
3055 }
3056 return obj
3057}
3058func (self *ActionNxMultipath) GetActionName() string {
3059 return "nx_multipath"
3060}
3061
3062func (self *ActionNxMultipath) GetActionFields() map[string]interface{} {
3063 return map[string]interface{}{
3064 "Fields": self.Fields,
3065 "Basis": self.Basis,
3066 "Algorithm": self.Algorithm,
3067 "MaxLink": self.MaxLink,
3068 "Arg": self.Arg,
3069 "OfsNbits": self.OfsNbits,
3070 "Dst": self.Dst,
3071 }
3072}
3073
3074func (self *ActionNxMultipath) MarshalJSON() ([]byte, error) {
3075 jsonValue, err := json.Marshal(self.GetActionFields())
3076 if err != nil {
3077 return nil, err
3078 }
3079 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3080}
3081
3082type ActionNxNat struct {
3083 *ActionNicira
3084 Flags uint16
3085 RangePresent NxNatRange
3086 Ipv4Min net.IP
3087 Ipv4Max net.IP
3088 Ipv6Min net.IP
3089 Ipv6Max net.IP
3090 ProtoMin uint32
3091 ProtoMax uint32
3092}
3093
3094type IActionNxNat interface {
3095 IActionNicira
3096 GetFlags() uint16
3097 GetRangePresent() NxNatRange
3098 GetIpv4Min() net.IP
3099 GetIpv4Max() net.IP
3100 GetIpv6Min() net.IP
3101 GetIpv6Max() net.IP
3102 GetProtoMin() uint32
3103 GetProtoMax() uint32
3104}
3105
3106func (self *ActionNxNat) GetFlags() uint16 {
3107 return self.Flags
3108}
3109
3110func (self *ActionNxNat) SetFlags(v uint16) {
3111 self.Flags = v
3112}
3113
3114func (self *ActionNxNat) GetRangePresent() NxNatRange {
3115 return self.RangePresent
3116}
3117
3118func (self *ActionNxNat) SetRangePresent(v NxNatRange) {
3119 self.RangePresent = v
3120}
3121
3122func (self *ActionNxNat) GetIpv4Min() net.IP {
3123 return self.Ipv4Min
3124}
3125
3126func (self *ActionNxNat) SetIpv4Min(v net.IP) {
3127 self.Ipv4Min = v
3128}
3129
3130func (self *ActionNxNat) GetIpv4Max() net.IP {
3131 return self.Ipv4Max
3132}
3133
3134func (self *ActionNxNat) SetIpv4Max(v net.IP) {
3135 self.Ipv4Max = v
3136}
3137
3138func (self *ActionNxNat) GetIpv6Min() net.IP {
3139 return self.Ipv6Min
3140}
3141
3142func (self *ActionNxNat) SetIpv6Min(v net.IP) {
3143 self.Ipv6Min = v
3144}
3145
3146func (self *ActionNxNat) GetIpv6Max() net.IP {
3147 return self.Ipv6Max
3148}
3149
3150func (self *ActionNxNat) SetIpv6Max(v net.IP) {
3151 self.Ipv6Max = v
3152}
3153
3154func (self *ActionNxNat) GetProtoMin() uint32 {
3155 return self.ProtoMin
3156}
3157
3158func (self *ActionNxNat) SetProtoMin(v uint32) {
3159 self.ProtoMin = v
3160}
3161
3162func (self *ActionNxNat) GetProtoMax() uint32 {
3163 return self.ProtoMax
3164}
3165
3166func (self *ActionNxNat) SetProtoMax(v uint32) {
3167 self.ProtoMax = v
3168}
3169
3170func (self *ActionNxNat) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003171 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003172 if err := self.ActionNicira.Serialize(encoder); err != nil {
3173 return err
3174 }
3175
3176 encoder.Write(bytes.Repeat([]byte{0}, 2))
3177 encoder.PutUint16(uint16(self.Flags))
3178 encoder.PutUint16(uint16(self.RangePresent))
3179 encoder.Write(self.Ipv4Min.To4())
3180 encoder.Write(self.Ipv4Max.To4())
3181 encoder.Write(self.Ipv6Min.To16())
3182 encoder.Write(self.Ipv6Max.To16())
3183 encoder.PutUint32(uint32(self.ProtoMin))
3184 encoder.PutUint32(uint32(self.ProtoMax))
Jonathan Hart828908c2020-04-15 14:23:45 -07003185 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003186
Jonathan Hart828908c2020-04-15 14:23:45 -07003187 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003188
3189 return nil
3190}
3191
3192func DecodeActionNxNat(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxNat, error) {
3193 _actionnxnat := &ActionNxNat{ActionNicira: parent}
3194 if decoder.Length() < 6 {
3195 return nil, fmt.Errorf("ActionNxNat packet too short: %d < 6", decoder.Length())
3196 }
3197 decoder.Skip(2)
3198 _actionnxnat.Flags = uint16(decoder.ReadUint16())
3199 _actionnxnat.RangePresent = NxNatRange(decoder.ReadUint16())
3200 if _actionnxnat.RangePresent&1 == 1 {
3201 _actionnxnat.Ipv4Min = net.IP(decoder.Read(4))
3202 }
3203 if _actionnxnat.RangePresent&2 == 2 {
3204 _actionnxnat.Ipv4Max = net.IP(decoder.Read(4))
3205 }
3206 if _actionnxnat.RangePresent&4 == 4 {
3207 _actionnxnat.Ipv6Min = net.IP(decoder.Read(16))
3208 }
3209 if _actionnxnat.RangePresent&8 == 8 {
3210 _actionnxnat.Ipv6Max = net.IP(decoder.Read(16))
3211 }
3212 if _actionnxnat.RangePresent&16 == 16 {
3213 _actionnxnat.ProtoMin = uint32(decoder.ReadUint32())
3214 }
3215 if _actionnxnat.RangePresent&32 == 32 {
3216 _actionnxnat.ProtoMax = uint32(decoder.ReadUint32())
3217 }
3218 return _actionnxnat, nil
3219}
3220
3221func NewActionNxNat() *ActionNxNat {
3222 obj := &ActionNxNat{
3223 ActionNicira: NewActionNicira(36),
3224 }
3225 return obj
3226}
3227func (self *ActionNxNat) GetActionName() string {
3228 return "nx_nat"
3229}
3230
3231func (self *ActionNxNat) GetActionFields() map[string]interface{} {
3232 return map[string]interface{}{
3233 "Flags": self.Flags,
3234 "RangePresent": self.RangePresent,
3235 "Ipv4Min": self.Ipv4Min,
3236 "Ipv4Max": self.Ipv4Max,
3237 "Ipv6Min": self.Ipv6Min,
3238 "Ipv6Max": self.Ipv6Max,
3239 "ProtoMin": self.ProtoMin,
3240 "ProtoMax": self.ProtoMax,
3241 }
3242}
3243
3244func (self *ActionNxNat) MarshalJSON() ([]byte, error) {
3245 jsonValue, err := json.Marshal(self.GetActionFields())
3246 if err != nil {
3247 return nil, err
3248 }
3249 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3250}
3251
3252type ActionNxNote struct {
3253 *ActionNicira
3254 Note []byte
3255}
3256
3257type IActionNxNote interface {
3258 IActionNicira
3259 GetNote() []byte
3260}
3261
3262func (self *ActionNxNote) GetNote() []byte {
3263 return self.Note
3264}
3265
3266func (self *ActionNxNote) SetNote(v []byte) {
3267 self.Note = v
3268}
3269
3270func (self *ActionNxNote) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003271 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003272 if err := self.ActionNicira.Serialize(encoder); err != nil {
3273 return err
3274 }
3275
3276 encoder.Write(self.Note)
Jonathan Hart828908c2020-04-15 14:23:45 -07003277 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003278
Jonathan Hart828908c2020-04-15 14:23:45 -07003279 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003280
3281 return nil
3282}
3283
3284func DecodeActionNxNote(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxNote, error) {
3285 _actionnxnote := &ActionNxNote{ActionNicira: parent}
3286 _actionnxnote.Note = decoder.Read(int(decoder.Length()))
3287 return _actionnxnote, nil
3288}
3289
3290func NewActionNxNote() *ActionNxNote {
3291 obj := &ActionNxNote{
3292 ActionNicira: NewActionNicira(8),
3293 }
3294 return obj
3295}
3296func (self *ActionNxNote) GetActionName() string {
3297 return "nx_note"
3298}
3299
3300func (self *ActionNxNote) GetActionFields() map[string]interface{} {
3301 return map[string]interface{}{
3302 "Note": self.Note,
3303 }
3304}
3305
3306func (self *ActionNxNote) MarshalJSON() ([]byte, error) {
3307 jsonValue, err := json.Marshal(self.GetActionFields())
3308 if err != nil {
3309 return nil, err
3310 }
3311 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3312}
3313
3314type ActionNxOutputReg struct {
3315 *ActionNicira
3316 OfsNbits uint16
3317 Src uint32
3318 MaxLen uint16
3319}
3320
3321type IActionNxOutputReg interface {
3322 IActionNicira
3323 GetOfsNbits() uint16
3324 GetSrc() uint32
3325 GetMaxLen() uint16
3326}
3327
3328func (self *ActionNxOutputReg) GetOfsNbits() uint16 {
3329 return self.OfsNbits
3330}
3331
3332func (self *ActionNxOutputReg) SetOfsNbits(v uint16) {
3333 self.OfsNbits = v
3334}
3335
3336func (self *ActionNxOutputReg) GetSrc() uint32 {
3337 return self.Src
3338}
3339
3340func (self *ActionNxOutputReg) SetSrc(v uint32) {
3341 self.Src = v
3342}
3343
3344func (self *ActionNxOutputReg) GetMaxLen() uint16 {
3345 return self.MaxLen
3346}
3347
3348func (self *ActionNxOutputReg) SetMaxLen(v uint16) {
3349 self.MaxLen = v
3350}
3351
3352func (self *ActionNxOutputReg) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003353 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003354 if err := self.ActionNicira.Serialize(encoder); err != nil {
3355 return err
3356 }
3357
3358 encoder.PutUint16(uint16(self.OfsNbits))
3359 encoder.PutUint32(uint32(self.Src))
3360 encoder.PutUint16(uint16(self.MaxLen))
3361 encoder.Write(bytes.Repeat([]byte{0}, 6))
Jonathan Hart828908c2020-04-15 14:23:45 -07003362 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003363
Jonathan Hart828908c2020-04-15 14:23:45 -07003364 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003365
3366 return nil
3367}
3368
3369func DecodeActionNxOutputReg(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxOutputReg, error) {
3370 _actionnxoutputreg := &ActionNxOutputReg{ActionNicira: parent}
3371 if decoder.Length() < 14 {
3372 return nil, fmt.Errorf("ActionNxOutputReg packet too short: %d < 14", decoder.Length())
3373 }
3374 _actionnxoutputreg.OfsNbits = uint16(decoder.ReadUint16())
3375 _actionnxoutputreg.Src = uint32(decoder.ReadUint32())
3376 _actionnxoutputreg.MaxLen = uint16(decoder.ReadUint16())
3377 decoder.Skip(6)
3378 return _actionnxoutputreg, nil
3379}
3380
3381func NewActionNxOutputReg() *ActionNxOutputReg {
3382 obj := &ActionNxOutputReg{
3383 ActionNicira: NewActionNicira(15),
3384 }
3385 return obj
3386}
3387func (self *ActionNxOutputReg) GetActionName() string {
3388 return "nx_output_reg"
3389}
3390
3391func (self *ActionNxOutputReg) GetActionFields() map[string]interface{} {
3392 return map[string]interface{}{
3393 "OfsNbits": self.OfsNbits,
3394 "Src": self.Src,
3395 "MaxLen": self.MaxLen,
3396 }
3397}
3398
3399func (self *ActionNxOutputReg) MarshalJSON() ([]byte, error) {
3400 jsonValue, err := json.Marshal(self.GetActionFields())
3401 if err != nil {
3402 return nil, err
3403 }
3404 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3405}
3406
3407type ActionNxOutputReg2 struct {
3408 *ActionNicira
3409 OfsNbits uint16
3410 MaxLen uint16
3411}
3412
3413type IActionNxOutputReg2 interface {
3414 IActionNicira
3415 GetOfsNbits() uint16
3416 GetMaxLen() uint16
3417}
3418
3419func (self *ActionNxOutputReg2) GetOfsNbits() uint16 {
3420 return self.OfsNbits
3421}
3422
3423func (self *ActionNxOutputReg2) SetOfsNbits(v uint16) {
3424 self.OfsNbits = v
3425}
3426
3427func (self *ActionNxOutputReg2) GetMaxLen() uint16 {
3428 return self.MaxLen
3429}
3430
3431func (self *ActionNxOutputReg2) SetMaxLen(v uint16) {
3432 self.MaxLen = v
3433}
3434
3435func (self *ActionNxOutputReg2) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003436 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003437 if err := self.ActionNicira.Serialize(encoder); err != nil {
3438 return err
3439 }
3440
3441 encoder.PutUint16(uint16(self.OfsNbits))
3442 encoder.PutUint16(uint16(self.MaxLen))
3443 encoder.Write(bytes.Repeat([]byte{0}, 10))
Jonathan Hart828908c2020-04-15 14:23:45 -07003444 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003445
Jonathan Hart828908c2020-04-15 14:23:45 -07003446 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003447
3448 return nil
3449}
3450
3451func DecodeActionNxOutputReg2(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxOutputReg2, error) {
3452 _actionnxoutputreg2 := &ActionNxOutputReg2{ActionNicira: parent}
3453 if decoder.Length() < 14 {
3454 return nil, fmt.Errorf("ActionNxOutputReg2 packet too short: %d < 14", decoder.Length())
3455 }
3456 _actionnxoutputreg2.OfsNbits = uint16(decoder.ReadUint16())
3457 _actionnxoutputreg2.MaxLen = uint16(decoder.ReadUint16())
3458 decoder.Skip(10)
3459 return _actionnxoutputreg2, nil
3460}
3461
3462func NewActionNxOutputReg2() *ActionNxOutputReg2 {
3463 obj := &ActionNxOutputReg2{
3464 ActionNicira: NewActionNicira(32),
3465 }
3466 return obj
3467}
3468func (self *ActionNxOutputReg2) GetActionName() string {
3469 return "nx_output_reg2"
3470}
3471
3472func (self *ActionNxOutputReg2) GetActionFields() map[string]interface{} {
3473 return map[string]interface{}{
3474 "OfsNbits": self.OfsNbits,
3475 "MaxLen": self.MaxLen,
3476 }
3477}
3478
3479func (self *ActionNxOutputReg2) MarshalJSON() ([]byte, error) {
3480 jsonValue, err := json.Marshal(self.GetActionFields())
3481 if err != nil {
3482 return nil, err
3483 }
3484 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3485}
3486
3487type ActionNxOutputTrunc struct {
3488 *ActionNicira
3489 Port uint16
3490 MaxLen uint32
3491}
3492
3493type IActionNxOutputTrunc interface {
3494 IActionNicira
3495 GetPort() uint16
3496 GetMaxLen() uint32
3497}
3498
3499func (self *ActionNxOutputTrunc) GetPort() uint16 {
3500 return self.Port
3501}
3502
3503func (self *ActionNxOutputTrunc) SetPort(v uint16) {
3504 self.Port = v
3505}
3506
3507func (self *ActionNxOutputTrunc) GetMaxLen() uint32 {
3508 return self.MaxLen
3509}
3510
3511func (self *ActionNxOutputTrunc) SetMaxLen(v uint32) {
3512 self.MaxLen = v
3513}
3514
3515func (self *ActionNxOutputTrunc) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003516 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003517 if err := self.ActionNicira.Serialize(encoder); err != nil {
3518 return err
3519 }
3520
3521 encoder.PutUint16(uint16(self.Port))
3522 encoder.PutUint32(uint32(self.MaxLen))
Jonathan Hart828908c2020-04-15 14:23:45 -07003523 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003524
Jonathan Hart828908c2020-04-15 14:23:45 -07003525 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003526
3527 return nil
3528}
3529
3530func DecodeActionNxOutputTrunc(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxOutputTrunc, error) {
3531 _actionnxoutputtrunc := &ActionNxOutputTrunc{ActionNicira: parent}
3532 if decoder.Length() < 6 {
3533 return nil, fmt.Errorf("ActionNxOutputTrunc packet too short: %d < 6", decoder.Length())
3534 }
3535 _actionnxoutputtrunc.Port = uint16(decoder.ReadUint16())
3536 _actionnxoutputtrunc.MaxLen = uint32(decoder.ReadUint32())
3537 return _actionnxoutputtrunc, nil
3538}
3539
3540func NewActionNxOutputTrunc() *ActionNxOutputTrunc {
3541 obj := &ActionNxOutputTrunc{
3542 ActionNicira: NewActionNicira(39),
3543 }
3544 return obj
3545}
3546func (self *ActionNxOutputTrunc) GetActionName() string {
3547 return "nx_output_trunc"
3548}
3549
3550func (self *ActionNxOutputTrunc) GetActionFields() map[string]interface{} {
3551 return map[string]interface{}{
3552 "Port": self.Port,
3553 "MaxLen": self.MaxLen,
3554 }
3555}
3556
3557func (self *ActionNxOutputTrunc) MarshalJSON() ([]byte, error) {
3558 jsonValue, err := json.Marshal(self.GetActionFields())
3559 if err != nil {
3560 return nil, err
3561 }
3562 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3563}
3564
3565type ActionNxPopMpls struct {
3566 *ActionNicira
3567 Value uint16
3568}
3569
3570type IActionNxPopMpls interface {
3571 IActionNicira
3572 GetValue() uint16
3573}
3574
3575func (self *ActionNxPopMpls) GetValue() uint16 {
3576 return self.Value
3577}
3578
3579func (self *ActionNxPopMpls) SetValue(v uint16) {
3580 self.Value = v
3581}
3582
3583func (self *ActionNxPopMpls) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003584 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003585 if err := self.ActionNicira.Serialize(encoder); err != nil {
3586 return err
3587 }
3588
3589 encoder.PutUint16(uint16(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07003590 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003591
Jonathan Hart828908c2020-04-15 14:23:45 -07003592 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003593
3594 return nil
3595}
3596
3597func DecodeActionNxPopMpls(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxPopMpls, error) {
3598 _actionnxpopmpls := &ActionNxPopMpls{ActionNicira: parent}
3599 if decoder.Length() < 2 {
3600 return nil, fmt.Errorf("ActionNxPopMpls packet too short: %d < 2", decoder.Length())
3601 }
3602 _actionnxpopmpls.Value = uint16(decoder.ReadUint16())
3603 return _actionnxpopmpls, nil
3604}
3605
3606func NewActionNxPopMpls() *ActionNxPopMpls {
3607 obj := &ActionNxPopMpls{
3608 ActionNicira: NewActionNicira(24),
3609 }
3610 return obj
3611}
3612func (self *ActionNxPopMpls) GetActionName() string {
3613 return "nx_pop_mpls"
3614}
3615
3616func (self *ActionNxPopMpls) GetActionFields() map[string]interface{} {
3617 return map[string]interface{}{
3618 "Value": self.Value,
3619 }
3620}
3621
3622func (self *ActionNxPopMpls) MarshalJSON() ([]byte, error) {
3623 jsonValue, err := json.Marshal(self.GetActionFields())
3624 if err != nil {
3625 return nil, err
3626 }
3627 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3628}
3629
3630type ActionNxPopQueue struct {
3631 *ActionNicira
3632}
3633
3634type IActionNxPopQueue interface {
3635 IActionNicira
3636}
3637
3638func (self *ActionNxPopQueue) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003639 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003640 if err := self.ActionNicira.Serialize(encoder); err != nil {
3641 return err
3642 }
Jonathan Hart828908c2020-04-15 14:23:45 -07003643 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003644
Jonathan Hart828908c2020-04-15 14:23:45 -07003645 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003646
3647 return nil
3648}
3649
3650func DecodeActionNxPopQueue(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxPopQueue, error) {
3651 _actionnxpopqueue := &ActionNxPopQueue{ActionNicira: parent}
3652 return _actionnxpopqueue, nil
3653}
3654
3655func NewActionNxPopQueue() *ActionNxPopQueue {
3656 obj := &ActionNxPopQueue{
3657 ActionNicira: NewActionNicira(5),
3658 }
3659 return obj
3660}
3661func (self *ActionNxPopQueue) GetActionName() string {
3662 return "nx_pop_queue"
3663}
3664
3665func (self *ActionNxPopQueue) GetActionFields() map[string]interface{} {
3666 return map[string]interface{}{}
3667}
3668
3669func (self *ActionNxPopQueue) MarshalJSON() ([]byte, error) {
3670 jsonValue, err := json.Marshal(self.GetActionFields())
3671 if err != nil {
3672 return nil, err
3673 }
3674 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3675}
3676
3677type ActionNxPushMpls struct {
3678 *ActionNicira
3679 Value uint16
3680}
3681
3682type IActionNxPushMpls interface {
3683 IActionNicira
3684 GetValue() uint16
3685}
3686
3687func (self *ActionNxPushMpls) GetValue() uint16 {
3688 return self.Value
3689}
3690
3691func (self *ActionNxPushMpls) SetValue(v uint16) {
3692 self.Value = v
3693}
3694
3695func (self *ActionNxPushMpls) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003696 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003697 if err := self.ActionNicira.Serialize(encoder); err != nil {
3698 return err
3699 }
3700
3701 encoder.PutUint16(uint16(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07003702 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003703
Jonathan Hart828908c2020-04-15 14:23:45 -07003704 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003705
3706 return nil
3707}
3708
3709func DecodeActionNxPushMpls(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxPushMpls, error) {
3710 _actionnxpushmpls := &ActionNxPushMpls{ActionNicira: parent}
3711 if decoder.Length() < 2 {
3712 return nil, fmt.Errorf("ActionNxPushMpls packet too short: %d < 2", decoder.Length())
3713 }
3714 _actionnxpushmpls.Value = uint16(decoder.ReadUint16())
3715 return _actionnxpushmpls, nil
3716}
3717
3718func NewActionNxPushMpls() *ActionNxPushMpls {
3719 obj := &ActionNxPushMpls{
3720 ActionNicira: NewActionNicira(23),
3721 }
3722 return obj
3723}
3724func (self *ActionNxPushMpls) GetActionName() string {
3725 return "nx_push_mpls"
3726}
3727
3728func (self *ActionNxPushMpls) GetActionFields() map[string]interface{} {
3729 return map[string]interface{}{
3730 "Value": self.Value,
3731 }
3732}
3733
3734func (self *ActionNxPushMpls) MarshalJSON() ([]byte, error) {
3735 jsonValue, err := json.Marshal(self.GetActionFields())
3736 if err != nil {
3737 return nil, err
3738 }
3739 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3740}
3741
3742type ActionNxRegLoad struct {
3743 *ActionNicira
3744 OfsNbits uint16
3745 SrcField goloxi.IOxmId
3746 Value uint64
3747}
3748
3749type IActionNxRegLoad interface {
3750 IActionNicira
3751 GetOfsNbits() uint16
3752 GetSrcField() goloxi.IOxmId
3753 GetValue() uint64
3754}
3755
3756func (self *ActionNxRegLoad) GetOfsNbits() uint16 {
3757 return self.OfsNbits
3758}
3759
3760func (self *ActionNxRegLoad) SetOfsNbits(v uint16) {
3761 self.OfsNbits = v
3762}
3763
3764func (self *ActionNxRegLoad) GetSrcField() goloxi.IOxmId {
3765 return self.SrcField
3766}
3767
3768func (self *ActionNxRegLoad) SetSrcField(v goloxi.IOxmId) {
3769 self.SrcField = v
3770}
3771
3772func (self *ActionNxRegLoad) GetValue() uint64 {
3773 return self.Value
3774}
3775
3776func (self *ActionNxRegLoad) SetValue(v uint64) {
3777 self.Value = v
3778}
3779
3780func (self *ActionNxRegLoad) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003781 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003782 if err := self.ActionNicira.Serialize(encoder); err != nil {
3783 return err
3784 }
3785
3786 encoder.PutUint16(uint16(self.OfsNbits))
3787 self.SrcField.Serialize(encoder)
3788 encoder.PutUint64(uint64(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07003789 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003790
Jonathan Hart828908c2020-04-15 14:23:45 -07003791 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003792
3793 return nil
3794}
3795
3796func DecodeActionNxRegLoad(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxRegLoad, error) {
3797 _actionnxregload := &ActionNxRegLoad{ActionNicira: parent}
3798 if decoder.Length() < 14 {
3799 return nil, fmt.Errorf("ActionNxRegLoad packet too short: %d < 14", decoder.Length())
3800 }
3801 _actionnxregload.OfsNbits = uint16(decoder.ReadUint16())
3802 if obj, err := DecodeOxmId(decoder); err != nil {
3803 return nil, err
3804 } else {
3805 _actionnxregload.SrcField = obj
3806 }
3807
3808 _actionnxregload.Value = uint64(decoder.ReadUint64())
3809 return _actionnxregload, nil
3810}
3811
3812func NewActionNxRegLoad() *ActionNxRegLoad {
3813 obj := &ActionNxRegLoad{
3814 ActionNicira: NewActionNicira(7),
3815 }
3816 return obj
3817}
3818func (self *ActionNxRegLoad) GetActionName() string {
3819 return "nx_reg_load"
3820}
3821
3822func (self *ActionNxRegLoad) GetActionFields() map[string]interface{} {
3823 return map[string]interface{}{
3824 "OfsNbits": self.OfsNbits,
3825 "SrcField": self.SrcField,
3826 "Value": self.Value,
3827 }
3828}
3829
3830func (self *ActionNxRegLoad) MarshalJSON() ([]byte, error) {
3831 jsonValue, err := json.Marshal(self.GetActionFields())
3832 if err != nil {
3833 return nil, err
3834 }
3835 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3836}
3837
3838type ActionNxRegLoad2 struct {
3839 *ActionNicira
3840}
3841
3842type IActionNxRegLoad2 interface {
3843 IActionNicira
3844}
3845
3846func (self *ActionNxRegLoad2) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003847 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003848 if err := self.ActionNicira.Serialize(encoder); err != nil {
3849 return err
3850 }
3851
3852 encoder.Write(bytes.Repeat([]byte{0}, 6))
Jonathan Hart828908c2020-04-15 14:23:45 -07003853 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04003854
Jonathan Hart828908c2020-04-15 14:23:45 -07003855 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04003856
3857 return nil
3858}
3859
3860func DecodeActionNxRegLoad2(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxRegLoad2, error) {
3861 _actionnxregload2 := &ActionNxRegLoad2{ActionNicira: parent}
3862 if decoder.Length() < 6 {
3863 return nil, fmt.Errorf("ActionNxRegLoad2 packet too short: %d < 6", decoder.Length())
3864 }
3865 decoder.Skip(6)
3866 return _actionnxregload2, nil
3867}
3868
3869func NewActionNxRegLoad2() *ActionNxRegLoad2 {
3870 obj := &ActionNxRegLoad2{
3871 ActionNicira: NewActionNicira(33),
3872 }
3873 return obj
3874}
3875func (self *ActionNxRegLoad2) GetActionName() string {
3876 return "nx_reg_load2"
3877}
3878
3879func (self *ActionNxRegLoad2) GetActionFields() map[string]interface{} {
3880 return map[string]interface{}{}
3881}
3882
3883func (self *ActionNxRegLoad2) MarshalJSON() ([]byte, error) {
3884 jsonValue, err := json.Marshal(self.GetActionFields())
3885 if err != nil {
3886 return nil, err
3887 }
3888 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
3889}
3890
3891type ActionNxRegMove struct {
3892 *ActionNicira
3893 NBits uint16
3894 SrcOfs uint16
3895 DstOfs uint16
3896 Src goloxi.IOxmId
3897 Dst goloxi.IOxmId
3898}
3899
3900type IActionNxRegMove interface {
3901 IActionNicira
3902 GetNBits() uint16
3903 GetSrcOfs() uint16
3904 GetDstOfs() uint16
3905 GetSrc() goloxi.IOxmId
3906 GetDst() goloxi.IOxmId
3907}
3908
3909func (self *ActionNxRegMove) GetNBits() uint16 {
3910 return self.NBits
3911}
3912
3913func (self *ActionNxRegMove) SetNBits(v uint16) {
3914 self.NBits = v
3915}
3916
3917func (self *ActionNxRegMove) GetSrcOfs() uint16 {
3918 return self.SrcOfs
3919}
3920
3921func (self *ActionNxRegMove) SetSrcOfs(v uint16) {
3922 self.SrcOfs = v
3923}
3924
3925func (self *ActionNxRegMove) GetDstOfs() uint16 {
3926 return self.DstOfs
3927}
3928
3929func (self *ActionNxRegMove) SetDstOfs(v uint16) {
3930 self.DstOfs = v
3931}
3932
3933func (self *ActionNxRegMove) GetSrc() goloxi.IOxmId {
3934 return self.Src
3935}
3936
3937func (self *ActionNxRegMove) SetSrc(v goloxi.IOxmId) {
3938 self.Src = v
3939}
3940
3941func (self *ActionNxRegMove) GetDst() goloxi.IOxmId {
3942 return self.Dst
3943}
3944
3945func (self *ActionNxRegMove) SetDst(v goloxi.IOxmId) {
3946 self.Dst = v
3947}
3948
3949func (self *ActionNxRegMove) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07003950 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04003951 if err := self.ActionNicira.Serialize(encoder); err != nil {
3952 return err
3953 }
3954
3955 encoder.PutUint16(uint16(self.NBits))
3956 encoder.PutUint16(uint16(self.SrcOfs))
3957 encoder.PutUint16(uint16(self.DstOfs))
3958 self.Src.Serialize(encoder)
3959 self.Dst.Serialize(encoder)
Jonathan Hart828908c2020-04-15 14:23:45 -07003960 length := len(encoder.Bytes()) - startIndex
3961 alignedLength := ((length + 7) / 8 * 8)
Don Newton98fd8812019-09-23 15:15:02 -04003962
Jonathan Hart828908c2020-04-15 14:23:45 -07003963 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
3964
3965 encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
Don Newton98fd8812019-09-23 15:15:02 -04003966
3967 return nil
3968}
3969
3970func DecodeActionNxRegMove(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxRegMove, error) {
3971 _actionnxregmove := &ActionNxRegMove{ActionNicira: parent}
3972 if decoder.Length() < 14 {
3973 return nil, fmt.Errorf("ActionNxRegMove packet too short: %d < 14", decoder.Length())
3974 }
3975 _actionnxregmove.NBits = uint16(decoder.ReadUint16())
3976 _actionnxregmove.SrcOfs = uint16(decoder.ReadUint16())
3977 _actionnxregmove.DstOfs = uint16(decoder.ReadUint16())
3978 if obj, err := DecodeOxmId(decoder); err != nil {
3979 return nil, err
3980 } else {
3981 _actionnxregmove.Src = obj
3982 }
3983
3984 if obj, err := DecodeOxmId(decoder); err != nil {
3985 return nil, err
3986 } else {
3987 _actionnxregmove.Dst = obj
3988 }
3989
3990 return _actionnxregmove, nil
3991}
3992
3993func NewActionNxRegMove() *ActionNxRegMove {
3994 obj := &ActionNxRegMove{
3995 ActionNicira: NewActionNicira(6),
3996 }
3997 return obj
3998}
3999func (self *ActionNxRegMove) GetActionName() string {
4000 return "nx_reg_move"
4001}
4002
4003func (self *ActionNxRegMove) GetActionFields() map[string]interface{} {
4004 return map[string]interface{}{
4005 "NBits": self.NBits,
4006 "SrcOfs": self.SrcOfs,
4007 "DstOfs": self.DstOfs,
4008 "Src": self.Src,
4009 "Dst": self.Dst,
4010 }
4011}
4012
4013func (self *ActionNxRegMove) MarshalJSON() ([]byte, error) {
4014 jsonValue, err := json.Marshal(self.GetActionFields())
4015 if err != nil {
4016 return nil, err
4017 }
4018 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4019}
4020
4021type ActionNxResubmit struct {
4022 *ActionNicira
4023 Value uint16
4024}
4025
4026type IActionNxResubmit interface {
4027 IActionNicira
4028 GetValue() uint16
4029}
4030
4031func (self *ActionNxResubmit) GetValue() uint16 {
4032 return self.Value
4033}
4034
4035func (self *ActionNxResubmit) SetValue(v uint16) {
4036 self.Value = v
4037}
4038
4039func (self *ActionNxResubmit) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004040 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004041 if err := self.ActionNicira.Serialize(encoder); err != nil {
4042 return err
4043 }
4044
4045 encoder.PutUint16(uint16(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004046 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004047
Jonathan Hart828908c2020-04-15 14:23:45 -07004048 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004049
4050 return nil
4051}
4052
4053func DecodeActionNxResubmit(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxResubmit, error) {
4054 _actionnxresubmit := &ActionNxResubmit{ActionNicira: parent}
4055 if decoder.Length() < 2 {
4056 return nil, fmt.Errorf("ActionNxResubmit packet too short: %d < 2", decoder.Length())
4057 }
4058 _actionnxresubmit.Value = uint16(decoder.ReadUint16())
4059 return _actionnxresubmit, nil
4060}
4061
4062func NewActionNxResubmit() *ActionNxResubmit {
4063 obj := &ActionNxResubmit{
4064 ActionNicira: NewActionNicira(1),
4065 }
4066 return obj
4067}
4068func (self *ActionNxResubmit) GetActionName() string {
4069 return "nx_resubmit"
4070}
4071
4072func (self *ActionNxResubmit) GetActionFields() map[string]interface{} {
4073 return map[string]interface{}{
4074 "Value": self.Value,
4075 }
4076}
4077
4078func (self *ActionNxResubmit) MarshalJSON() ([]byte, error) {
4079 jsonValue, err := json.Marshal(self.GetActionFields())
4080 if err != nil {
4081 return nil, err
4082 }
4083 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4084}
4085
4086type ActionNxResubmitTable struct {
4087 *ActionNicira
4088 InPort uint16
4089 Table uint8
4090}
4091
4092type IActionNxResubmitTable interface {
4093 IActionNicira
4094 GetInPort() uint16
4095 GetTable() uint8
4096}
4097
4098func (self *ActionNxResubmitTable) GetInPort() uint16 {
4099 return self.InPort
4100}
4101
4102func (self *ActionNxResubmitTable) SetInPort(v uint16) {
4103 self.InPort = v
4104}
4105
4106func (self *ActionNxResubmitTable) GetTable() uint8 {
4107 return self.Table
4108}
4109
4110func (self *ActionNxResubmitTable) SetTable(v uint8) {
4111 self.Table = v
4112}
4113
4114func (self *ActionNxResubmitTable) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004115 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004116 if err := self.ActionNicira.Serialize(encoder); err != nil {
4117 return err
4118 }
4119
4120 encoder.PutUint16(uint16(self.InPort))
4121 encoder.PutUint8(uint8(self.Table))
4122 encoder.Write(bytes.Repeat([]byte{0}, 3))
Jonathan Hart828908c2020-04-15 14:23:45 -07004123 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004124
Jonathan Hart828908c2020-04-15 14:23:45 -07004125 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004126
4127 return nil
4128}
4129
4130func DecodeActionNxResubmitTable(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxResubmitTable, error) {
4131 _actionnxresubmittable := &ActionNxResubmitTable{ActionNicira: parent}
4132 if decoder.Length() < 6 {
4133 return nil, fmt.Errorf("ActionNxResubmitTable packet too short: %d < 6", decoder.Length())
4134 }
4135 _actionnxresubmittable.InPort = uint16(decoder.ReadUint16())
4136 _actionnxresubmittable.Table = uint8(decoder.ReadByte())
4137 decoder.Skip(3)
4138 return _actionnxresubmittable, nil
4139}
4140
4141func NewActionNxResubmitTable() *ActionNxResubmitTable {
4142 obj := &ActionNxResubmitTable{
4143 ActionNicira: NewActionNicira(14),
4144 }
4145 return obj
4146}
4147func (self *ActionNxResubmitTable) GetActionName() string {
4148 return "nx_resubmit_table"
4149}
4150
4151func (self *ActionNxResubmitTable) GetActionFields() map[string]interface{} {
4152 return map[string]interface{}{
4153 "InPort": self.InPort,
4154 "Table": self.Table,
4155 }
4156}
4157
4158func (self *ActionNxResubmitTable) MarshalJSON() ([]byte, error) {
4159 jsonValue, err := json.Marshal(self.GetActionFields())
4160 if err != nil {
4161 return nil, err
4162 }
4163 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4164}
4165
4166type ActionNxResubmitTableCt struct {
4167 *ActionNicira
4168 InPort uint16
4169 Table uint8
4170}
4171
4172type IActionNxResubmitTableCt interface {
4173 IActionNicira
4174 GetInPort() uint16
4175 GetTable() uint8
4176}
4177
4178func (self *ActionNxResubmitTableCt) GetInPort() uint16 {
4179 return self.InPort
4180}
4181
4182func (self *ActionNxResubmitTableCt) SetInPort(v uint16) {
4183 self.InPort = v
4184}
4185
4186func (self *ActionNxResubmitTableCt) GetTable() uint8 {
4187 return self.Table
4188}
4189
4190func (self *ActionNxResubmitTableCt) SetTable(v uint8) {
4191 self.Table = v
4192}
4193
4194func (self *ActionNxResubmitTableCt) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004195 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004196 if err := self.ActionNicira.Serialize(encoder); err != nil {
4197 return err
4198 }
4199
4200 encoder.PutUint16(uint16(self.InPort))
4201 encoder.PutUint8(uint8(self.Table))
4202 encoder.Write(bytes.Repeat([]byte{0}, 3))
Jonathan Hart828908c2020-04-15 14:23:45 -07004203 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004204
Jonathan Hart828908c2020-04-15 14:23:45 -07004205 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004206
4207 return nil
4208}
4209
4210func DecodeActionNxResubmitTableCt(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxResubmitTableCt, error) {
4211 _actionnxresubmittablect := &ActionNxResubmitTableCt{ActionNicira: parent}
4212 if decoder.Length() < 6 {
4213 return nil, fmt.Errorf("ActionNxResubmitTableCt packet too short: %d < 6", decoder.Length())
4214 }
4215 _actionnxresubmittablect.InPort = uint16(decoder.ReadUint16())
4216 _actionnxresubmittablect.Table = uint8(decoder.ReadByte())
4217 decoder.Skip(3)
4218 return _actionnxresubmittablect, nil
4219}
4220
4221func NewActionNxResubmitTableCt() *ActionNxResubmitTableCt {
4222 obj := &ActionNxResubmitTableCt{
4223 ActionNicira: NewActionNicira(44),
4224 }
4225 return obj
4226}
4227func (self *ActionNxResubmitTableCt) GetActionName() string {
4228 return "nx_resubmit_table_ct"
4229}
4230
4231func (self *ActionNxResubmitTableCt) GetActionFields() map[string]interface{} {
4232 return map[string]interface{}{
4233 "InPort": self.InPort,
4234 "Table": self.Table,
4235 }
4236}
4237
4238func (self *ActionNxResubmitTableCt) MarshalJSON() ([]byte, error) {
4239 jsonValue, err := json.Marshal(self.GetActionFields())
4240 if err != nil {
4241 return nil, err
4242 }
4243 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4244}
4245
4246type ActionNxSample struct {
4247 *ActionNicira
4248 Probability uint16
4249 CollectorSetId uint32
4250 ObsDomainId uint32
4251 ObsPointId uint32
4252}
4253
4254type IActionNxSample interface {
4255 IActionNicira
4256 GetProbability() uint16
4257 GetCollectorSetId() uint32
4258 GetObsDomainId() uint32
4259 GetObsPointId() uint32
4260}
4261
4262func (self *ActionNxSample) GetProbability() uint16 {
4263 return self.Probability
4264}
4265
4266func (self *ActionNxSample) SetProbability(v uint16) {
4267 self.Probability = v
4268}
4269
4270func (self *ActionNxSample) GetCollectorSetId() uint32 {
4271 return self.CollectorSetId
4272}
4273
4274func (self *ActionNxSample) SetCollectorSetId(v uint32) {
4275 self.CollectorSetId = v
4276}
4277
4278func (self *ActionNxSample) GetObsDomainId() uint32 {
4279 return self.ObsDomainId
4280}
4281
4282func (self *ActionNxSample) SetObsDomainId(v uint32) {
4283 self.ObsDomainId = v
4284}
4285
4286func (self *ActionNxSample) GetObsPointId() uint32 {
4287 return self.ObsPointId
4288}
4289
4290func (self *ActionNxSample) SetObsPointId(v uint32) {
4291 self.ObsPointId = v
4292}
4293
4294func (self *ActionNxSample) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004295 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004296 if err := self.ActionNicira.Serialize(encoder); err != nil {
4297 return err
4298 }
4299
4300 encoder.PutUint16(uint16(self.Probability))
4301 encoder.PutUint32(uint32(self.CollectorSetId))
4302 encoder.PutUint32(uint32(self.ObsDomainId))
4303 encoder.PutUint32(uint32(self.ObsPointId))
Jonathan Hart828908c2020-04-15 14:23:45 -07004304 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004305
Jonathan Hart828908c2020-04-15 14:23:45 -07004306 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004307
4308 return nil
4309}
4310
4311func DecodeActionNxSample(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSample, error) {
4312 _actionnxsample := &ActionNxSample{ActionNicira: parent}
4313 if decoder.Length() < 14 {
4314 return nil, fmt.Errorf("ActionNxSample packet too short: %d < 14", decoder.Length())
4315 }
4316 _actionnxsample.Probability = uint16(decoder.ReadUint16())
4317 _actionnxsample.CollectorSetId = uint32(decoder.ReadUint32())
4318 _actionnxsample.ObsDomainId = uint32(decoder.ReadUint32())
4319 _actionnxsample.ObsPointId = uint32(decoder.ReadUint32())
4320 return _actionnxsample, nil
4321}
4322
4323func NewActionNxSample() *ActionNxSample {
4324 obj := &ActionNxSample{
4325 ActionNicira: NewActionNicira(29),
4326 }
4327 return obj
4328}
4329func (self *ActionNxSample) GetActionName() string {
4330 return "nx_sample"
4331}
4332
4333func (self *ActionNxSample) GetActionFields() map[string]interface{} {
4334 return map[string]interface{}{
4335 "Probability": self.Probability,
4336 "CollectorSetId": self.CollectorSetId,
4337 "ObsDomainId": self.ObsDomainId,
4338 "ObsPointId": self.ObsPointId,
4339 }
4340}
4341
4342func (self *ActionNxSample) MarshalJSON() ([]byte, error) {
4343 jsonValue, err := json.Marshal(self.GetActionFields())
4344 if err != nil {
4345 return nil, err
4346 }
4347 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4348}
4349
4350type ActionNxSample2 struct {
4351 *ActionNicira
4352 Probability uint16
4353 CollectorSetId uint32
4354 ObsDomainId uint32
4355 ObsPointId uint32
4356 SamplingPort uint16
4357 Direction uint8
4358}
4359
4360type IActionNxSample2 interface {
4361 IActionNicira
4362 GetProbability() uint16
4363 GetCollectorSetId() uint32
4364 GetObsDomainId() uint32
4365 GetObsPointId() uint32
4366 GetSamplingPort() uint16
4367 GetDirection() uint8
4368}
4369
4370func (self *ActionNxSample2) GetProbability() uint16 {
4371 return self.Probability
4372}
4373
4374func (self *ActionNxSample2) SetProbability(v uint16) {
4375 self.Probability = v
4376}
4377
4378func (self *ActionNxSample2) GetCollectorSetId() uint32 {
4379 return self.CollectorSetId
4380}
4381
4382func (self *ActionNxSample2) SetCollectorSetId(v uint32) {
4383 self.CollectorSetId = v
4384}
4385
4386func (self *ActionNxSample2) GetObsDomainId() uint32 {
4387 return self.ObsDomainId
4388}
4389
4390func (self *ActionNxSample2) SetObsDomainId(v uint32) {
4391 self.ObsDomainId = v
4392}
4393
4394func (self *ActionNxSample2) GetObsPointId() uint32 {
4395 return self.ObsPointId
4396}
4397
4398func (self *ActionNxSample2) SetObsPointId(v uint32) {
4399 self.ObsPointId = v
4400}
4401
4402func (self *ActionNxSample2) GetSamplingPort() uint16 {
4403 return self.SamplingPort
4404}
4405
4406func (self *ActionNxSample2) SetSamplingPort(v uint16) {
4407 self.SamplingPort = v
4408}
4409
4410func (self *ActionNxSample2) GetDirection() uint8 {
4411 return self.Direction
4412}
4413
4414func (self *ActionNxSample2) SetDirection(v uint8) {
4415 self.Direction = v
4416}
4417
4418func (self *ActionNxSample2) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004419 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004420 if err := self.ActionNicira.Serialize(encoder); err != nil {
4421 return err
4422 }
4423
4424 encoder.PutUint16(uint16(self.Probability))
4425 encoder.PutUint32(uint32(self.CollectorSetId))
4426 encoder.PutUint32(uint32(self.ObsDomainId))
4427 encoder.PutUint32(uint32(self.ObsPointId))
4428 encoder.PutUint16(uint16(self.SamplingPort))
4429 encoder.PutUint8(uint8(self.Direction))
4430 encoder.Write(bytes.Repeat([]byte{0}, 5))
Jonathan Hart828908c2020-04-15 14:23:45 -07004431 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004432
Jonathan Hart828908c2020-04-15 14:23:45 -07004433 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004434
4435 return nil
4436}
4437
4438func DecodeActionNxSample2(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSample2, error) {
4439 _actionnxsample2 := &ActionNxSample2{ActionNicira: parent}
4440 if decoder.Length() < 22 {
4441 return nil, fmt.Errorf("ActionNxSample2 packet too short: %d < 22", decoder.Length())
4442 }
4443 _actionnxsample2.Probability = uint16(decoder.ReadUint16())
4444 _actionnxsample2.CollectorSetId = uint32(decoder.ReadUint32())
4445 _actionnxsample2.ObsDomainId = uint32(decoder.ReadUint32())
4446 _actionnxsample2.ObsPointId = uint32(decoder.ReadUint32())
4447 _actionnxsample2.SamplingPort = uint16(decoder.ReadUint16())
4448 _actionnxsample2.Direction = uint8(decoder.ReadByte())
4449 decoder.Skip(5)
4450 return _actionnxsample2, nil
4451}
4452
4453func NewActionNxSample2() *ActionNxSample2 {
4454 obj := &ActionNxSample2{
4455 ActionNicira: NewActionNicira(38),
4456 }
4457 return obj
4458}
4459func (self *ActionNxSample2) GetActionName() string {
4460 return "nx_sample2"
4461}
4462
4463func (self *ActionNxSample2) GetActionFields() map[string]interface{} {
4464 return map[string]interface{}{
4465 "Probability": self.Probability,
4466 "CollectorSetId": self.CollectorSetId,
4467 "ObsDomainId": self.ObsDomainId,
4468 "ObsPointId": self.ObsPointId,
4469 "SamplingPort": self.SamplingPort,
4470 "Direction": self.Direction,
4471 }
4472}
4473
4474func (self *ActionNxSample2) MarshalJSON() ([]byte, error) {
4475 jsonValue, err := json.Marshal(self.GetActionFields())
4476 if err != nil {
4477 return nil, err
4478 }
4479 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4480}
4481
4482type ActionNxSample3 struct {
4483 *ActionNicira
4484 Probability uint16
4485 CollectorSetId uint32
4486 ObsDomainId uint32
4487 ObsPointId uint32
4488 SamplingPort uint16
4489 Direction uint8
4490}
4491
4492type IActionNxSample3 interface {
4493 IActionNicira
4494 GetProbability() uint16
4495 GetCollectorSetId() uint32
4496 GetObsDomainId() uint32
4497 GetObsPointId() uint32
4498 GetSamplingPort() uint16
4499 GetDirection() uint8
4500}
4501
4502func (self *ActionNxSample3) GetProbability() uint16 {
4503 return self.Probability
4504}
4505
4506func (self *ActionNxSample3) SetProbability(v uint16) {
4507 self.Probability = v
4508}
4509
4510func (self *ActionNxSample3) GetCollectorSetId() uint32 {
4511 return self.CollectorSetId
4512}
4513
4514func (self *ActionNxSample3) SetCollectorSetId(v uint32) {
4515 self.CollectorSetId = v
4516}
4517
4518func (self *ActionNxSample3) GetObsDomainId() uint32 {
4519 return self.ObsDomainId
4520}
4521
4522func (self *ActionNxSample3) SetObsDomainId(v uint32) {
4523 self.ObsDomainId = v
4524}
4525
4526func (self *ActionNxSample3) GetObsPointId() uint32 {
4527 return self.ObsPointId
4528}
4529
4530func (self *ActionNxSample3) SetObsPointId(v uint32) {
4531 self.ObsPointId = v
4532}
4533
4534func (self *ActionNxSample3) GetSamplingPort() uint16 {
4535 return self.SamplingPort
4536}
4537
4538func (self *ActionNxSample3) SetSamplingPort(v uint16) {
4539 self.SamplingPort = v
4540}
4541
4542func (self *ActionNxSample3) GetDirection() uint8 {
4543 return self.Direction
4544}
4545
4546func (self *ActionNxSample3) SetDirection(v uint8) {
4547 self.Direction = v
4548}
4549
4550func (self *ActionNxSample3) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004551 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004552 if err := self.ActionNicira.Serialize(encoder); err != nil {
4553 return err
4554 }
4555
4556 encoder.PutUint16(uint16(self.Probability))
4557 encoder.PutUint32(uint32(self.CollectorSetId))
4558 encoder.PutUint32(uint32(self.ObsDomainId))
4559 encoder.PutUint32(uint32(self.ObsPointId))
4560 encoder.PutUint16(uint16(self.SamplingPort))
4561 encoder.PutUint8(uint8(self.Direction))
4562 encoder.Write(bytes.Repeat([]byte{0}, 5))
Jonathan Hart828908c2020-04-15 14:23:45 -07004563 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004564
Jonathan Hart828908c2020-04-15 14:23:45 -07004565 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004566
4567 return nil
4568}
4569
4570func DecodeActionNxSample3(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSample3, error) {
4571 _actionnxsample3 := &ActionNxSample3{ActionNicira: parent}
4572 if decoder.Length() < 22 {
4573 return nil, fmt.Errorf("ActionNxSample3 packet too short: %d < 22", decoder.Length())
4574 }
4575 _actionnxsample3.Probability = uint16(decoder.ReadUint16())
4576 _actionnxsample3.CollectorSetId = uint32(decoder.ReadUint32())
4577 _actionnxsample3.ObsDomainId = uint32(decoder.ReadUint32())
4578 _actionnxsample3.ObsPointId = uint32(decoder.ReadUint32())
4579 _actionnxsample3.SamplingPort = uint16(decoder.ReadUint16())
4580 _actionnxsample3.Direction = uint8(decoder.ReadByte())
4581 decoder.Skip(5)
4582 return _actionnxsample3, nil
4583}
4584
4585func NewActionNxSample3() *ActionNxSample3 {
4586 obj := &ActionNxSample3{
4587 ActionNicira: NewActionNicira(41),
4588 }
4589 return obj
4590}
4591func (self *ActionNxSample3) GetActionName() string {
4592 return "nx_sample3"
4593}
4594
4595func (self *ActionNxSample3) GetActionFields() map[string]interface{} {
4596 return map[string]interface{}{
4597 "Probability": self.Probability,
4598 "CollectorSetId": self.CollectorSetId,
4599 "ObsDomainId": self.ObsDomainId,
4600 "ObsPointId": self.ObsPointId,
4601 "SamplingPort": self.SamplingPort,
4602 "Direction": self.Direction,
4603 }
4604}
4605
4606func (self *ActionNxSample3) MarshalJSON() ([]byte, error) {
4607 jsonValue, err := json.Marshal(self.GetActionFields())
4608 if err != nil {
4609 return nil, err
4610 }
4611 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4612}
4613
4614type ActionNxSetMplsLabel struct {
4615 *ActionNicira
4616 Value uint32
4617}
4618
4619type IActionNxSetMplsLabel interface {
4620 IActionNicira
4621 GetValue() uint32
4622}
4623
4624func (self *ActionNxSetMplsLabel) GetValue() uint32 {
4625 return self.Value
4626}
4627
4628func (self *ActionNxSetMplsLabel) SetValue(v uint32) {
4629 self.Value = v
4630}
4631
4632func (self *ActionNxSetMplsLabel) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004633 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004634 if err := self.ActionNicira.Serialize(encoder); err != nil {
4635 return err
4636 }
4637
4638 encoder.PutUint32(uint32(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004639 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004640
Jonathan Hart828908c2020-04-15 14:23:45 -07004641 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004642
4643 return nil
4644}
4645
4646func DecodeActionNxSetMplsLabel(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSetMplsLabel, error) {
4647 _actionnxsetmplslabel := &ActionNxSetMplsLabel{ActionNicira: parent}
4648 if decoder.Length() < 4 {
4649 return nil, fmt.Errorf("ActionNxSetMplsLabel packet too short: %d < 4", decoder.Length())
4650 }
4651 _actionnxsetmplslabel.Value = uint32(decoder.ReadUint32())
4652 return _actionnxsetmplslabel, nil
4653}
4654
4655func NewActionNxSetMplsLabel() *ActionNxSetMplsLabel {
4656 obj := &ActionNxSetMplsLabel{
4657 ActionNicira: NewActionNicira(30),
4658 }
4659 return obj
4660}
4661func (self *ActionNxSetMplsLabel) GetActionName() string {
4662 return "nx_set_mpls_label"
4663}
4664
4665func (self *ActionNxSetMplsLabel) GetActionFields() map[string]interface{} {
4666 return map[string]interface{}{
4667 "Value": self.Value,
4668 }
4669}
4670
4671func (self *ActionNxSetMplsLabel) MarshalJSON() ([]byte, error) {
4672 jsonValue, err := json.Marshal(self.GetActionFields())
4673 if err != nil {
4674 return nil, err
4675 }
4676 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4677}
4678
4679type ActionNxSetMplsTc struct {
4680 *ActionNicira
4681 Value uint8
4682}
4683
4684type IActionNxSetMplsTc interface {
4685 IActionNicira
4686 GetValue() uint8
4687}
4688
4689func (self *ActionNxSetMplsTc) GetValue() uint8 {
4690 return self.Value
4691}
4692
4693func (self *ActionNxSetMplsTc) SetValue(v uint8) {
4694 self.Value = v
4695}
4696
4697func (self *ActionNxSetMplsTc) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004698 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004699 if err := self.ActionNicira.Serialize(encoder); err != nil {
4700 return err
4701 }
4702
4703 encoder.PutUint8(uint8(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004704 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004705
Jonathan Hart828908c2020-04-15 14:23:45 -07004706 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004707
4708 return nil
4709}
4710
4711func DecodeActionNxSetMplsTc(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSetMplsTc, error) {
4712 _actionnxsetmplstc := &ActionNxSetMplsTc{ActionNicira: parent}
4713 if decoder.Length() < 1 {
4714 return nil, fmt.Errorf("ActionNxSetMplsTc packet too short: %d < 1", decoder.Length())
4715 }
4716 _actionnxsetmplstc.Value = uint8(decoder.ReadByte())
4717 return _actionnxsetmplstc, nil
4718}
4719
4720func NewActionNxSetMplsTc() *ActionNxSetMplsTc {
4721 obj := &ActionNxSetMplsTc{
4722 ActionNicira: NewActionNicira(31),
4723 }
4724 return obj
4725}
4726func (self *ActionNxSetMplsTc) GetActionName() string {
4727 return "nx_set_mpls_tc"
4728}
4729
4730func (self *ActionNxSetMplsTc) GetActionFields() map[string]interface{} {
4731 return map[string]interface{}{
4732 "Value": self.Value,
4733 }
4734}
4735
4736func (self *ActionNxSetMplsTc) MarshalJSON() ([]byte, error) {
4737 jsonValue, err := json.Marshal(self.GetActionFields())
4738 if err != nil {
4739 return nil, err
4740 }
4741 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4742}
4743
4744type ActionNxSetMplsTtl struct {
4745 *ActionNicira
4746 Value uint8
4747}
4748
4749type IActionNxSetMplsTtl interface {
4750 IActionNicira
4751 GetValue() uint8
4752}
4753
4754func (self *ActionNxSetMplsTtl) GetValue() uint8 {
4755 return self.Value
4756}
4757
4758func (self *ActionNxSetMplsTtl) SetValue(v uint8) {
4759 self.Value = v
4760}
4761
4762func (self *ActionNxSetMplsTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004763 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004764 if err := self.ActionNicira.Serialize(encoder); err != nil {
4765 return err
4766 }
4767
4768 encoder.PutUint8(uint8(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004769 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004770
Jonathan Hart828908c2020-04-15 14:23:45 -07004771 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004772
4773 return nil
4774}
4775
4776func DecodeActionNxSetMplsTtl(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSetMplsTtl, error) {
4777 _actionnxsetmplsttl := &ActionNxSetMplsTtl{ActionNicira: parent}
4778 if decoder.Length() < 1 {
4779 return nil, fmt.Errorf("ActionNxSetMplsTtl packet too short: %d < 1", decoder.Length())
4780 }
4781 _actionnxsetmplsttl.Value = uint8(decoder.ReadByte())
4782 return _actionnxsetmplsttl, nil
4783}
4784
4785func NewActionNxSetMplsTtl() *ActionNxSetMplsTtl {
4786 obj := &ActionNxSetMplsTtl{
4787 ActionNicira: NewActionNicira(25),
4788 }
4789 return obj
4790}
4791func (self *ActionNxSetMplsTtl) GetActionName() string {
4792 return "nx_set_mpls_ttl"
4793}
4794
4795func (self *ActionNxSetMplsTtl) GetActionFields() map[string]interface{} {
4796 return map[string]interface{}{
4797 "Value": self.Value,
4798 }
4799}
4800
4801func (self *ActionNxSetMplsTtl) MarshalJSON() ([]byte, error) {
4802 jsonValue, err := json.Marshal(self.GetActionFields())
4803 if err != nil {
4804 return nil, err
4805 }
4806 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4807}
4808
4809type ActionNxSetQueue struct {
4810 *ActionNicira
4811 Value uint32
4812}
4813
4814type IActionNxSetQueue interface {
4815 IActionNicira
4816 GetValue() uint32
4817}
4818
4819func (self *ActionNxSetQueue) GetValue() uint32 {
4820 return self.Value
4821}
4822
4823func (self *ActionNxSetQueue) SetValue(v uint32) {
4824 self.Value = v
4825}
4826
4827func (self *ActionNxSetQueue) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004828 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004829 if err := self.ActionNicira.Serialize(encoder); err != nil {
4830 return err
4831 }
4832
4833 encoder.PutUint32(uint32(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004834 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004835
Jonathan Hart828908c2020-04-15 14:23:45 -07004836 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004837
4838 return nil
4839}
4840
4841func DecodeActionNxSetQueue(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSetQueue, error) {
4842 _actionnxsetqueue := &ActionNxSetQueue{ActionNicira: parent}
4843 if decoder.Length() < 4 {
4844 return nil, fmt.Errorf("ActionNxSetQueue packet too short: %d < 4", decoder.Length())
4845 }
4846 _actionnxsetqueue.Value = uint32(decoder.ReadUint32())
4847 return _actionnxsetqueue, nil
4848}
4849
4850func NewActionNxSetQueue() *ActionNxSetQueue {
4851 obj := &ActionNxSetQueue{
4852 ActionNicira: NewActionNicira(4),
4853 }
4854 return obj
4855}
4856func (self *ActionNxSetQueue) GetActionName() string {
4857 return "nx_set_queue"
4858}
4859
4860func (self *ActionNxSetQueue) GetActionFields() map[string]interface{} {
4861 return map[string]interface{}{
4862 "Value": self.Value,
4863 }
4864}
4865
4866func (self *ActionNxSetQueue) MarshalJSON() ([]byte, error) {
4867 jsonValue, err := json.Marshal(self.GetActionFields())
4868 if err != nil {
4869 return nil, err
4870 }
4871 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4872}
4873
4874type ActionNxSetTunnel struct {
4875 *ActionNicira
4876 Value uint32
4877}
4878
4879type IActionNxSetTunnel interface {
4880 IActionNicira
4881 GetValue() uint32
4882}
4883
4884func (self *ActionNxSetTunnel) GetValue() uint32 {
4885 return self.Value
4886}
4887
4888func (self *ActionNxSetTunnel) SetValue(v uint32) {
4889 self.Value = v
4890}
4891
4892func (self *ActionNxSetTunnel) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004893 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004894 if err := self.ActionNicira.Serialize(encoder); err != nil {
4895 return err
4896 }
4897
4898 encoder.PutUint32(uint32(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004899 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004900
Jonathan Hart828908c2020-04-15 14:23:45 -07004901 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004902
4903 return nil
4904}
4905
4906func DecodeActionNxSetTunnel(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSetTunnel, error) {
4907 _actionnxsettunnel := &ActionNxSetTunnel{ActionNicira: parent}
4908 if decoder.Length() < 4 {
4909 return nil, fmt.Errorf("ActionNxSetTunnel packet too short: %d < 4", decoder.Length())
4910 }
4911 _actionnxsettunnel.Value = uint32(decoder.ReadUint32())
4912 return _actionnxsettunnel, nil
4913}
4914
4915func NewActionNxSetTunnel() *ActionNxSetTunnel {
4916 obj := &ActionNxSetTunnel{
4917 ActionNicira: NewActionNicira(2),
4918 }
4919 return obj
4920}
4921func (self *ActionNxSetTunnel) GetActionName() string {
4922 return "nx_set_tunnel"
4923}
4924
4925func (self *ActionNxSetTunnel) GetActionFields() map[string]interface{} {
4926 return map[string]interface{}{
4927 "Value": self.Value,
4928 }
4929}
4930
4931func (self *ActionNxSetTunnel) MarshalJSON() ([]byte, error) {
4932 jsonValue, err := json.Marshal(self.GetActionFields())
4933 if err != nil {
4934 return nil, err
4935 }
4936 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
4937}
4938
4939type ActionNxSetTunnel64 struct {
4940 *ActionNicira
4941 Value uint64
4942}
4943
4944type IActionNxSetTunnel64 interface {
4945 IActionNicira
4946 GetValue() uint64
4947}
4948
4949func (self *ActionNxSetTunnel64) GetValue() uint64 {
4950 return self.Value
4951}
4952
4953func (self *ActionNxSetTunnel64) SetValue(v uint64) {
4954 self.Value = v
4955}
4956
4957func (self *ActionNxSetTunnel64) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07004958 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04004959 if err := self.ActionNicira.Serialize(encoder); err != nil {
4960 return err
4961 }
4962
4963 encoder.PutUint64(uint64(self.Value))
Jonathan Hart828908c2020-04-15 14:23:45 -07004964 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04004965
Jonathan Hart828908c2020-04-15 14:23:45 -07004966 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04004967
4968 return nil
4969}
4970
4971func DecodeActionNxSetTunnel64(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxSetTunnel64, error) {
4972 _actionnxsettunnel64 := &ActionNxSetTunnel64{ActionNicira: parent}
4973 if decoder.Length() < 8 {
4974 return nil, fmt.Errorf("ActionNxSetTunnel64 packet too short: %d < 8", decoder.Length())
4975 }
4976 _actionnxsettunnel64.Value = uint64(decoder.ReadUint64())
4977 return _actionnxsettunnel64, nil
4978}
4979
4980func NewActionNxSetTunnel64() *ActionNxSetTunnel64 {
4981 obj := &ActionNxSetTunnel64{
4982 ActionNicira: NewActionNicira(9),
4983 }
4984 return obj
4985}
4986func (self *ActionNxSetTunnel64) GetActionName() string {
4987 return "nx_set_tunnel64"
4988}
4989
4990func (self *ActionNxSetTunnel64) GetActionFields() map[string]interface{} {
4991 return map[string]interface{}{
4992 "Value": self.Value,
4993 }
4994}
4995
4996func (self *ActionNxSetTunnel64) MarshalJSON() ([]byte, error) {
4997 jsonValue, err := json.Marshal(self.GetActionFields())
4998 if err != nil {
4999 return nil, err
5000 }
5001 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5002}
5003
5004type ActionNxStackPop struct {
5005 *ActionNicira
5006 Offset uint16
5007 Field goloxi.IOxmId
5008 NBits uint16
5009}
5010
5011type IActionNxStackPop interface {
5012 IActionNicira
5013 GetOffset() uint16
5014 GetField() goloxi.IOxmId
5015 GetNBits() uint16
5016}
5017
5018func (self *ActionNxStackPop) GetOffset() uint16 {
5019 return self.Offset
5020}
5021
5022func (self *ActionNxStackPop) SetOffset(v uint16) {
5023 self.Offset = v
5024}
5025
5026func (self *ActionNxStackPop) GetField() goloxi.IOxmId {
5027 return self.Field
5028}
5029
5030func (self *ActionNxStackPop) SetField(v goloxi.IOxmId) {
5031 self.Field = v
5032}
5033
5034func (self *ActionNxStackPop) GetNBits() uint16 {
5035 return self.NBits
5036}
5037
5038func (self *ActionNxStackPop) SetNBits(v uint16) {
5039 self.NBits = v
5040}
5041
5042func (self *ActionNxStackPop) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005043 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005044 if err := self.ActionNicira.Serialize(encoder); err != nil {
5045 return err
5046 }
5047
5048 encoder.PutUint16(uint16(self.Offset))
5049 self.Field.Serialize(encoder)
5050 encoder.PutUint16(uint16(self.NBits))
Jonathan Hart828908c2020-04-15 14:23:45 -07005051 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005052
Jonathan Hart828908c2020-04-15 14:23:45 -07005053 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005054
5055 return nil
5056}
5057
5058func DecodeActionNxStackPop(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxStackPop, error) {
5059 _actionnxstackpop := &ActionNxStackPop{ActionNicira: parent}
5060 if decoder.Length() < 8 {
5061 return nil, fmt.Errorf("ActionNxStackPop packet too short: %d < 8", decoder.Length())
5062 }
5063 _actionnxstackpop.Offset = uint16(decoder.ReadUint16())
5064 if obj, err := DecodeOxmId(decoder); err != nil {
5065 return nil, err
5066 } else {
5067 _actionnxstackpop.Field = obj
5068 }
5069
5070 _actionnxstackpop.NBits = uint16(decoder.ReadUint16())
5071 return _actionnxstackpop, nil
5072}
5073
5074func NewActionNxStackPop() *ActionNxStackPop {
5075 obj := &ActionNxStackPop{
5076 ActionNicira: NewActionNicira(28),
5077 }
5078 return obj
5079}
5080func (self *ActionNxStackPop) GetActionName() string {
5081 return "nx_stack_pop"
5082}
5083
5084func (self *ActionNxStackPop) GetActionFields() map[string]interface{} {
5085 return map[string]interface{}{
5086 "Offset": self.Offset,
5087 "Field": self.Field,
5088 "NBits": self.NBits,
5089 }
5090}
5091
5092func (self *ActionNxStackPop) MarshalJSON() ([]byte, error) {
5093 jsonValue, err := json.Marshal(self.GetActionFields())
5094 if err != nil {
5095 return nil, err
5096 }
5097 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5098}
5099
5100type ActionNxStackPush struct {
5101 *ActionNicira
5102 Offset uint16
5103 Field goloxi.IOxmId
5104 NBits uint16
5105}
5106
5107type IActionNxStackPush interface {
5108 IActionNicira
5109 GetOffset() uint16
5110 GetField() goloxi.IOxmId
5111 GetNBits() uint16
5112}
5113
5114func (self *ActionNxStackPush) GetOffset() uint16 {
5115 return self.Offset
5116}
5117
5118func (self *ActionNxStackPush) SetOffset(v uint16) {
5119 self.Offset = v
5120}
5121
5122func (self *ActionNxStackPush) GetField() goloxi.IOxmId {
5123 return self.Field
5124}
5125
5126func (self *ActionNxStackPush) SetField(v goloxi.IOxmId) {
5127 self.Field = v
5128}
5129
5130func (self *ActionNxStackPush) GetNBits() uint16 {
5131 return self.NBits
5132}
5133
5134func (self *ActionNxStackPush) SetNBits(v uint16) {
5135 self.NBits = v
5136}
5137
5138func (self *ActionNxStackPush) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005139 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005140 if err := self.ActionNicira.Serialize(encoder); err != nil {
5141 return err
5142 }
5143
5144 encoder.PutUint16(uint16(self.Offset))
5145 self.Field.Serialize(encoder)
5146 encoder.PutUint16(uint16(self.NBits))
Jonathan Hart828908c2020-04-15 14:23:45 -07005147 length := len(encoder.Bytes()) - startIndex
5148 alignedLength := ((length + 23) / 24 * 24)
Don Newton98fd8812019-09-23 15:15:02 -04005149
Jonathan Hart828908c2020-04-15 14:23:45 -07005150 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
5151
5152 encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
Don Newton98fd8812019-09-23 15:15:02 -04005153
5154 return nil
5155}
5156
5157func DecodeActionNxStackPush(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxStackPush, error) {
5158 _actionnxstackpush := &ActionNxStackPush{ActionNicira: parent}
5159 if decoder.Length() < 8 {
5160 return nil, fmt.Errorf("ActionNxStackPush packet too short: %d < 8", decoder.Length())
5161 }
5162 _actionnxstackpush.Offset = uint16(decoder.ReadUint16())
5163 if obj, err := DecodeOxmId(decoder); err != nil {
5164 return nil, err
5165 } else {
5166 _actionnxstackpush.Field = obj
5167 }
5168
5169 _actionnxstackpush.NBits = uint16(decoder.ReadUint16())
5170 return _actionnxstackpush, nil
5171}
5172
5173func NewActionNxStackPush() *ActionNxStackPush {
5174 obj := &ActionNxStackPush{
5175 ActionNicira: NewActionNicira(27),
5176 }
5177 return obj
5178}
5179func (self *ActionNxStackPush) GetActionName() string {
5180 return "nx_stack_push"
5181}
5182
5183func (self *ActionNxStackPush) GetActionFields() map[string]interface{} {
5184 return map[string]interface{}{
5185 "Offset": self.Offset,
5186 "Field": self.Field,
5187 "NBits": self.NBits,
5188 }
5189}
5190
5191func (self *ActionNxStackPush) MarshalJSON() ([]byte, error) {
5192 jsonValue, err := json.Marshal(self.GetActionFields())
5193 if err != nil {
5194 return nil, err
5195 }
5196 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5197}
5198
5199type ActionNxWriteMetadata struct {
5200 *ActionNicira
5201 Metadata uint64
5202 Mask uint64
5203}
5204
5205type IActionNxWriteMetadata interface {
5206 IActionNicira
5207 GetMetadata() uint64
5208 GetMask() uint64
5209}
5210
5211func (self *ActionNxWriteMetadata) GetMetadata() uint64 {
5212 return self.Metadata
5213}
5214
5215func (self *ActionNxWriteMetadata) SetMetadata(v uint64) {
5216 self.Metadata = v
5217}
5218
5219func (self *ActionNxWriteMetadata) GetMask() uint64 {
5220 return self.Mask
5221}
5222
5223func (self *ActionNxWriteMetadata) SetMask(v uint64) {
5224 self.Mask = v
5225}
5226
5227func (self *ActionNxWriteMetadata) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005228 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005229 if err := self.ActionNicira.Serialize(encoder); err != nil {
5230 return err
5231 }
5232
5233 encoder.Write(bytes.Repeat([]byte{0}, 6))
5234 encoder.PutUint64(uint64(self.Metadata))
5235 encoder.PutUint64(uint64(self.Mask))
Jonathan Hart828908c2020-04-15 14:23:45 -07005236 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005237
Jonathan Hart828908c2020-04-15 14:23:45 -07005238 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005239
5240 return nil
5241}
5242
5243func DecodeActionNxWriteMetadata(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionNxWriteMetadata, error) {
5244 _actionnxwritemetadata := &ActionNxWriteMetadata{ActionNicira: parent}
5245 if decoder.Length() < 22 {
5246 return nil, fmt.Errorf("ActionNxWriteMetadata packet too short: %d < 22", decoder.Length())
5247 }
5248 decoder.Skip(6)
5249 _actionnxwritemetadata.Metadata = uint64(decoder.ReadUint64())
5250 _actionnxwritemetadata.Mask = uint64(decoder.ReadUint64())
5251 return _actionnxwritemetadata, nil
5252}
5253
5254func NewActionNxWriteMetadata() *ActionNxWriteMetadata {
5255 obj := &ActionNxWriteMetadata{
5256 ActionNicira: NewActionNicira(22),
5257 }
5258 return obj
5259}
5260func (self *ActionNxWriteMetadata) GetActionName() string {
5261 return "nx_write_metadata"
5262}
5263
5264func (self *ActionNxWriteMetadata) GetActionFields() map[string]interface{} {
5265 return map[string]interface{}{
5266 "Metadata": self.Metadata,
5267 "Mask": self.Mask,
5268 }
5269}
5270
5271func (self *ActionNxWriteMetadata) MarshalJSON() ([]byte, error) {
5272 jsonValue, err := json.Marshal(self.GetActionFields())
5273 if err != nil {
5274 return nil, err
5275 }
5276 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5277}
5278
5279type ActionOutput struct {
5280 *Action
5281 Port Port
5282 MaxLen uint16
5283}
5284
5285type IActionOutput interface {
5286 goloxi.IAction
5287 GetPort() Port
5288 GetMaxLen() uint16
5289}
5290
5291func (self *ActionOutput) GetPort() Port {
5292 return self.Port
5293}
5294
5295func (self *ActionOutput) SetPort(v Port) {
5296 self.Port = v
5297}
5298
5299func (self *ActionOutput) GetMaxLen() uint16 {
5300 return self.MaxLen
5301}
5302
5303func (self *ActionOutput) SetMaxLen(v uint16) {
5304 self.MaxLen = v
5305}
5306
5307func (self *ActionOutput) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005308 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005309 if err := self.Action.Serialize(encoder); err != nil {
5310 return err
5311 }
5312
5313 self.Port.Serialize(encoder)
5314 encoder.PutUint16(uint16(self.MaxLen))
5315 encoder.Write(bytes.Repeat([]byte{0}, 6))
Jonathan Hart828908c2020-04-15 14:23:45 -07005316 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005317
Jonathan Hart828908c2020-04-15 14:23:45 -07005318 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005319
5320 return nil
5321}
5322
5323func DecodeActionOutput(parent *Action, decoder *goloxi.Decoder) (*ActionOutput, error) {
5324 _actionoutput := &ActionOutput{Action: parent}
5325 if decoder.Length() < 12 {
5326 return nil, fmt.Errorf("ActionOutput packet too short: %d < 12", decoder.Length())
5327 }
5328 _actionoutput.Port.Decode(decoder)
5329 _actionoutput.MaxLen = uint16(decoder.ReadUint16())
5330 decoder.Skip(6)
5331 return _actionoutput, nil
5332}
5333
5334func NewActionOutput() *ActionOutput {
5335 obj := &ActionOutput{
5336 Action: NewAction(0),
5337 }
5338 return obj
5339}
5340func (self *ActionOutput) GetActionName() string {
5341 return "output"
5342}
5343
5344func (self *ActionOutput) GetActionFields() map[string]interface{} {
5345 return map[string]interface{}{
5346 "Port": self.Port,
5347 "MaxLen": self.MaxLen,
5348 }
5349}
5350
5351func (self *ActionOutput) MarshalJSON() ([]byte, error) {
5352 jsonValue, err := json.Marshal(self.GetActionFields())
5353 if err != nil {
5354 return nil, err
5355 }
5356 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5357}
5358
5359type ActionPopMpls struct {
5360 *Action
5361 Ethertype uint16
5362}
5363
5364type IActionPopMpls interface {
5365 goloxi.IAction
5366 GetEthertype() uint16
5367}
5368
5369func (self *ActionPopMpls) GetEthertype() uint16 {
5370 return self.Ethertype
5371}
5372
5373func (self *ActionPopMpls) SetEthertype(v uint16) {
5374 self.Ethertype = v
5375}
5376
5377func (self *ActionPopMpls) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005378 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005379 if err := self.Action.Serialize(encoder); err != nil {
5380 return err
5381 }
5382
5383 encoder.PutUint16(uint16(self.Ethertype))
5384 encoder.Write(bytes.Repeat([]byte{0}, 2))
Jonathan Hart828908c2020-04-15 14:23:45 -07005385 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005386
Jonathan Hart828908c2020-04-15 14:23:45 -07005387 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005388
5389 return nil
5390}
5391
5392func DecodeActionPopMpls(parent *Action, decoder *goloxi.Decoder) (*ActionPopMpls, error) {
5393 _actionpopmpls := &ActionPopMpls{Action: parent}
5394 if decoder.Length() < 4 {
5395 return nil, fmt.Errorf("ActionPopMpls packet too short: %d < 4", decoder.Length())
5396 }
5397 _actionpopmpls.Ethertype = uint16(decoder.ReadUint16())
5398 decoder.Skip(2)
5399 return _actionpopmpls, nil
5400}
5401
5402func NewActionPopMpls() *ActionPopMpls {
5403 obj := &ActionPopMpls{
5404 Action: NewAction(20),
5405 }
5406 return obj
5407}
5408func (self *ActionPopMpls) GetActionName() string {
5409 return "pop_mpls"
5410}
5411
5412func (self *ActionPopMpls) GetActionFields() map[string]interface{} {
5413 return map[string]interface{}{
5414 "Ethertype": self.Ethertype,
5415 }
5416}
5417
5418func (self *ActionPopMpls) MarshalJSON() ([]byte, error) {
5419 jsonValue, err := json.Marshal(self.GetActionFields())
5420 if err != nil {
5421 return nil, err
5422 }
5423 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5424}
5425
5426type ActionPopPbb struct {
5427 *Action
5428}
5429
5430type IActionPopPbb interface {
5431 goloxi.IAction
5432}
5433
5434func (self *ActionPopPbb) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005435 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005436 if err := self.Action.Serialize(encoder); err != nil {
5437 return err
5438 }
5439
5440 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -07005441 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005442
Jonathan Hart828908c2020-04-15 14:23:45 -07005443 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005444
5445 return nil
5446}
5447
5448func DecodeActionPopPbb(parent *Action, decoder *goloxi.Decoder) (*ActionPopPbb, error) {
5449 _actionpoppbb := &ActionPopPbb{Action: parent}
5450 if decoder.Length() < 4 {
5451 return nil, fmt.Errorf("ActionPopPbb packet too short: %d < 4", decoder.Length())
5452 }
5453 decoder.Skip(4)
5454 return _actionpoppbb, nil
5455}
5456
5457func NewActionPopPbb() *ActionPopPbb {
5458 obj := &ActionPopPbb{
5459 Action: NewAction(27),
5460 }
5461 return obj
5462}
5463func (self *ActionPopPbb) GetActionName() string {
5464 return "pop_pbb"
5465}
5466
5467func (self *ActionPopPbb) GetActionFields() map[string]interface{} {
5468 return map[string]interface{}{}
5469}
5470
5471func (self *ActionPopPbb) MarshalJSON() ([]byte, error) {
5472 jsonValue, err := json.Marshal(self.GetActionFields())
5473 if err != nil {
5474 return nil, err
5475 }
5476 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5477}
5478
5479type ActionPopVlan struct {
5480 *Action
5481}
5482
5483type IActionPopVlan interface {
5484 goloxi.IAction
5485}
5486
5487func (self *ActionPopVlan) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005488 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005489 if err := self.Action.Serialize(encoder); err != nil {
5490 return err
5491 }
5492
5493 encoder.Write(bytes.Repeat([]byte{0}, 4))
Jonathan Hart828908c2020-04-15 14:23:45 -07005494 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005495
Jonathan Hart828908c2020-04-15 14:23:45 -07005496 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005497
5498 return nil
5499}
5500
5501func DecodeActionPopVlan(parent *Action, decoder *goloxi.Decoder) (*ActionPopVlan, error) {
5502 _actionpopvlan := &ActionPopVlan{Action: parent}
5503 if decoder.Length() < 4 {
5504 return nil, fmt.Errorf("ActionPopVlan packet too short: %d < 4", decoder.Length())
5505 }
5506 decoder.Skip(4)
5507 return _actionpopvlan, nil
5508}
5509
5510func NewActionPopVlan() *ActionPopVlan {
5511 obj := &ActionPopVlan{
5512 Action: NewAction(18),
5513 }
5514 return obj
5515}
5516func (self *ActionPopVlan) GetActionName() string {
5517 return "pop_vlan"
5518}
5519
5520func (self *ActionPopVlan) GetActionFields() map[string]interface{} {
5521 return map[string]interface{}{}
5522}
5523
5524func (self *ActionPopVlan) MarshalJSON() ([]byte, error) {
5525 jsonValue, err := json.Marshal(self.GetActionFields())
5526 if err != nil {
5527 return nil, err
5528 }
5529 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5530}
5531
5532type ActionPushMpls struct {
5533 *Action
5534 Ethertype uint16
5535}
5536
5537type IActionPushMpls interface {
5538 goloxi.IAction
5539 GetEthertype() uint16
5540}
5541
5542func (self *ActionPushMpls) GetEthertype() uint16 {
5543 return self.Ethertype
5544}
5545
5546func (self *ActionPushMpls) SetEthertype(v uint16) {
5547 self.Ethertype = v
5548}
5549
5550func (self *ActionPushMpls) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005551 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005552 if err := self.Action.Serialize(encoder); err != nil {
5553 return err
5554 }
5555
5556 encoder.PutUint16(uint16(self.Ethertype))
5557 encoder.Write(bytes.Repeat([]byte{0}, 2))
Jonathan Hart828908c2020-04-15 14:23:45 -07005558 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005559
Jonathan Hart828908c2020-04-15 14:23:45 -07005560 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005561
5562 return nil
5563}
5564
5565func DecodeActionPushMpls(parent *Action, decoder *goloxi.Decoder) (*ActionPushMpls, error) {
5566 _actionpushmpls := &ActionPushMpls{Action: parent}
5567 if decoder.Length() < 4 {
5568 return nil, fmt.Errorf("ActionPushMpls packet too short: %d < 4", decoder.Length())
5569 }
5570 _actionpushmpls.Ethertype = uint16(decoder.ReadUint16())
5571 decoder.Skip(2)
5572 return _actionpushmpls, nil
5573}
5574
5575func NewActionPushMpls() *ActionPushMpls {
5576 obj := &ActionPushMpls{
5577 Action: NewAction(19),
5578 }
5579 return obj
5580}
5581func (self *ActionPushMpls) GetActionName() string {
5582 return "push_mpls"
5583}
5584
5585func (self *ActionPushMpls) GetActionFields() map[string]interface{} {
5586 return map[string]interface{}{
5587 "Ethertype": self.Ethertype,
5588 }
5589}
5590
5591func (self *ActionPushMpls) MarshalJSON() ([]byte, error) {
5592 jsonValue, err := json.Marshal(self.GetActionFields())
5593 if err != nil {
5594 return nil, err
5595 }
5596 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5597}
5598
5599type ActionPushPbb struct {
5600 *Action
5601 Ethertype uint16
5602}
5603
5604type IActionPushPbb interface {
5605 goloxi.IAction
5606 GetEthertype() uint16
5607}
5608
5609func (self *ActionPushPbb) GetEthertype() uint16 {
5610 return self.Ethertype
5611}
5612
5613func (self *ActionPushPbb) SetEthertype(v uint16) {
5614 self.Ethertype = v
5615}
5616
5617func (self *ActionPushPbb) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005618 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005619 if err := self.Action.Serialize(encoder); err != nil {
5620 return err
5621 }
5622
5623 encoder.PutUint16(uint16(self.Ethertype))
5624 encoder.Write(bytes.Repeat([]byte{0}, 2))
Jonathan Hart828908c2020-04-15 14:23:45 -07005625 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005626
Jonathan Hart828908c2020-04-15 14:23:45 -07005627 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005628
5629 return nil
5630}
5631
5632func DecodeActionPushPbb(parent *Action, decoder *goloxi.Decoder) (*ActionPushPbb, error) {
5633 _actionpushpbb := &ActionPushPbb{Action: parent}
5634 if decoder.Length() < 4 {
5635 return nil, fmt.Errorf("ActionPushPbb packet too short: %d < 4", decoder.Length())
5636 }
5637 _actionpushpbb.Ethertype = uint16(decoder.ReadUint16())
5638 decoder.Skip(2)
5639 return _actionpushpbb, nil
5640}
5641
5642func NewActionPushPbb() *ActionPushPbb {
5643 obj := &ActionPushPbb{
5644 Action: NewAction(26),
5645 }
5646 return obj
5647}
5648func (self *ActionPushPbb) GetActionName() string {
5649 return "push_pbb"
5650}
5651
5652func (self *ActionPushPbb) GetActionFields() map[string]interface{} {
5653 return map[string]interface{}{
5654 "Ethertype": self.Ethertype,
5655 }
5656}
5657
5658func (self *ActionPushPbb) MarshalJSON() ([]byte, error) {
5659 jsonValue, err := json.Marshal(self.GetActionFields())
5660 if err != nil {
5661 return nil, err
5662 }
5663 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5664}
5665
5666type ActionPushVlan struct {
5667 *Action
5668 Ethertype uint16
5669}
5670
5671type IActionPushVlan interface {
5672 goloxi.IAction
5673 GetEthertype() uint16
5674}
5675
5676func (self *ActionPushVlan) GetEthertype() uint16 {
5677 return self.Ethertype
5678}
5679
5680func (self *ActionPushVlan) SetEthertype(v uint16) {
5681 self.Ethertype = v
5682}
5683
5684func (self *ActionPushVlan) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005685 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005686 if err := self.Action.Serialize(encoder); err != nil {
5687 return err
5688 }
5689
5690 encoder.PutUint16(uint16(self.Ethertype))
5691 encoder.Write(bytes.Repeat([]byte{0}, 2))
Jonathan Hart828908c2020-04-15 14:23:45 -07005692 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005693
Jonathan Hart828908c2020-04-15 14:23:45 -07005694 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005695
5696 return nil
5697}
5698
5699func DecodeActionPushVlan(parent *Action, decoder *goloxi.Decoder) (*ActionPushVlan, error) {
5700 _actionpushvlan := &ActionPushVlan{Action: parent}
5701 if decoder.Length() < 4 {
5702 return nil, fmt.Errorf("ActionPushVlan packet too short: %d < 4", decoder.Length())
5703 }
5704 _actionpushvlan.Ethertype = uint16(decoder.ReadUint16())
5705 decoder.Skip(2)
5706 return _actionpushvlan, nil
5707}
5708
5709func NewActionPushVlan() *ActionPushVlan {
5710 obj := &ActionPushVlan{
5711 Action: NewAction(17),
5712 }
5713 return obj
5714}
5715func (self *ActionPushVlan) GetActionName() string {
5716 return "push_vlan"
5717}
5718
5719func (self *ActionPushVlan) GetActionFields() map[string]interface{} {
5720 return map[string]interface{}{
5721 "Ethertype": self.Ethertype,
5722 }
5723}
5724
5725func (self *ActionPushVlan) MarshalJSON() ([]byte, error) {
5726 jsonValue, err := json.Marshal(self.GetActionFields())
5727 if err != nil {
5728 return nil, err
5729 }
5730 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5731}
5732
5733type ActionResubmit struct {
5734 *ActionNicira
5735 InPort uint16
5736 Table uint8
5737}
5738
5739type IActionResubmit interface {
5740 IActionNicira
5741 GetInPort() uint16
5742 GetTable() uint8
5743}
5744
5745func (self *ActionResubmit) GetInPort() uint16 {
5746 return self.InPort
5747}
5748
5749func (self *ActionResubmit) SetInPort(v uint16) {
5750 self.InPort = v
5751}
5752
5753func (self *ActionResubmit) GetTable() uint8 {
5754 return self.Table
5755}
5756
5757func (self *ActionResubmit) SetTable(v uint8) {
5758 self.Table = v
5759}
5760
5761func (self *ActionResubmit) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005762 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005763 if err := self.ActionNicira.Serialize(encoder); err != nil {
5764 return err
5765 }
5766
5767 encoder.PutUint16(uint16(self.InPort))
5768 encoder.PutUint8(uint8(self.Table))
5769 encoder.Write(bytes.Repeat([]byte{0}, 3))
Jonathan Hart828908c2020-04-15 14:23:45 -07005770 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005771
Jonathan Hart828908c2020-04-15 14:23:45 -07005772 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005773
5774 return nil
5775}
5776
5777func DecodeActionResubmit(parent *ActionNicira, decoder *goloxi.Decoder) (*ActionResubmit, error) {
5778 _actionresubmit := &ActionResubmit{ActionNicira: parent}
5779 if decoder.Length() < 6 {
5780 return nil, fmt.Errorf("ActionResubmit packet too short: %d < 6", decoder.Length())
5781 }
5782 _actionresubmit.InPort = uint16(decoder.ReadUint16())
5783 _actionresubmit.Table = uint8(decoder.ReadByte())
5784 decoder.Skip(3)
5785 return _actionresubmit, nil
5786}
5787
5788func NewActionResubmit() *ActionResubmit {
5789 obj := &ActionResubmit{
5790 ActionNicira: NewActionNicira(14),
5791 }
5792 return obj
5793}
5794func (self *ActionResubmit) GetActionName() string {
5795 return "resubmit"
5796}
5797
5798func (self *ActionResubmit) GetActionFields() map[string]interface{} {
5799 return map[string]interface{}{
5800 "InPort": self.InPort,
5801 "Table": self.Table,
5802 }
5803}
5804
5805func (self *ActionResubmit) MarshalJSON() ([]byte, error) {
5806 jsonValue, err := json.Marshal(self.GetActionFields())
5807 if err != nil {
5808 return nil, err
5809 }
5810 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5811}
5812
5813type ActionSetField struct {
5814 *Action
5815 Field goloxi.IOxm
5816}
5817
5818type IActionSetField interface {
5819 goloxi.IAction
5820 GetField() goloxi.IOxm
5821}
5822
5823func (self *ActionSetField) GetField() goloxi.IOxm {
5824 return self.Field
5825}
5826
5827func (self *ActionSetField) SetField(v goloxi.IOxm) {
5828 self.Field = v
5829}
5830
5831func (self *ActionSetField) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005832 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005833 if err := self.Action.Serialize(encoder); err != nil {
5834 return err
5835 }
5836
5837 self.Field.Serialize(encoder)
Jonathan Hart828908c2020-04-15 14:23:45 -07005838 length := len(encoder.Bytes()) - startIndex
5839 alignedLength := ((length + 7) / 8 * 8)
Don Newton98fd8812019-09-23 15:15:02 -04005840
Jonathan Hart828908c2020-04-15 14:23:45 -07005841 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(alignedLength))
5842
5843 encoder.Write(bytes.Repeat([]byte{0}, alignedLength-length))
Don Newton98fd8812019-09-23 15:15:02 -04005844
5845 return nil
5846}
5847
5848func DecodeActionSetField(parent *Action, decoder *goloxi.Decoder) (*ActionSetField, error) {
5849 _actionsetfield := &ActionSetField{Action: parent}
5850 if decoder.Length() < 4 {
5851 return nil, fmt.Errorf("ActionSetField packet too short: %d < 4", decoder.Length())
5852 }
5853 if obj, err := DecodeOxm(decoder); err != nil {
5854 return nil, err
5855 } else {
5856 _actionsetfield.Field = obj
5857 }
5858
5859 return _actionsetfield, nil
5860}
5861
5862func NewActionSetField() *ActionSetField {
5863 obj := &ActionSetField{
5864 Action: NewAction(25),
5865 }
5866 return obj
5867}
5868func (self *ActionSetField) GetActionName() string {
5869 return "set_field"
5870}
5871
5872func (self *ActionSetField) GetActionFields() map[string]interface{} {
5873 return map[string]interface{}{
5874 "Field": self.Field,
5875 }
5876}
5877
5878func (self *ActionSetField) MarshalJSON() ([]byte, error) {
5879 jsonValue, err := json.Marshal(self.GetActionFields())
5880 if err != nil {
5881 return nil, err
5882 }
5883 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5884}
5885
5886type ActionSetMplsTtl struct {
5887 *Action
5888 MplsTtl uint8
5889}
5890
5891type IActionSetMplsTtl interface {
5892 goloxi.IAction
5893 GetMplsTtl() uint8
5894}
5895
5896func (self *ActionSetMplsTtl) GetMplsTtl() uint8 {
5897 return self.MplsTtl
5898}
5899
5900func (self *ActionSetMplsTtl) SetMplsTtl(v uint8) {
5901 self.MplsTtl = v
5902}
5903
5904func (self *ActionSetMplsTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005905 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005906 if err := self.Action.Serialize(encoder); err != nil {
5907 return err
5908 }
5909
5910 encoder.PutUint8(uint8(self.MplsTtl))
5911 encoder.Write(bytes.Repeat([]byte{0}, 3))
Jonathan Hart828908c2020-04-15 14:23:45 -07005912 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005913
Jonathan Hart828908c2020-04-15 14:23:45 -07005914 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005915
5916 return nil
5917}
5918
5919func DecodeActionSetMplsTtl(parent *Action, decoder *goloxi.Decoder) (*ActionSetMplsTtl, error) {
5920 _actionsetmplsttl := &ActionSetMplsTtl{Action: parent}
5921 if decoder.Length() < 4 {
5922 return nil, fmt.Errorf("ActionSetMplsTtl packet too short: %d < 4", decoder.Length())
5923 }
5924 _actionsetmplsttl.MplsTtl = uint8(decoder.ReadByte())
5925 decoder.Skip(3)
5926 return _actionsetmplsttl, nil
5927}
5928
5929func NewActionSetMplsTtl() *ActionSetMplsTtl {
5930 obj := &ActionSetMplsTtl{
5931 Action: NewAction(15),
5932 }
5933 return obj
5934}
5935func (self *ActionSetMplsTtl) GetActionName() string {
5936 return "set_mpls_ttl"
5937}
5938
5939func (self *ActionSetMplsTtl) GetActionFields() map[string]interface{} {
5940 return map[string]interface{}{
5941 "MplsTtl": self.MplsTtl,
5942 }
5943}
5944
5945func (self *ActionSetMplsTtl) MarshalJSON() ([]byte, error) {
5946 jsonValue, err := json.Marshal(self.GetActionFields())
5947 if err != nil {
5948 return nil, err
5949 }
5950 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
5951}
5952
5953type ActionSetNwTtl struct {
5954 *Action
5955 NwTtl uint8
5956}
5957
5958type IActionSetNwTtl interface {
5959 goloxi.IAction
5960 GetNwTtl() uint8
5961}
5962
5963func (self *ActionSetNwTtl) GetNwTtl() uint8 {
5964 return self.NwTtl
5965}
5966
5967func (self *ActionSetNwTtl) SetNwTtl(v uint8) {
5968 self.NwTtl = v
5969}
5970
5971func (self *ActionSetNwTtl) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07005972 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04005973 if err := self.Action.Serialize(encoder); err != nil {
5974 return err
5975 }
5976
5977 encoder.PutUint8(uint8(self.NwTtl))
5978 encoder.Write(bytes.Repeat([]byte{0}, 3))
Jonathan Hart828908c2020-04-15 14:23:45 -07005979 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04005980
Jonathan Hart828908c2020-04-15 14:23:45 -07005981 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04005982
5983 return nil
5984}
5985
5986func DecodeActionSetNwTtl(parent *Action, decoder *goloxi.Decoder) (*ActionSetNwTtl, error) {
5987 _actionsetnwttl := &ActionSetNwTtl{Action: parent}
5988 if decoder.Length() < 4 {
5989 return nil, fmt.Errorf("ActionSetNwTtl packet too short: %d < 4", decoder.Length())
5990 }
5991 _actionsetnwttl.NwTtl = uint8(decoder.ReadByte())
5992 decoder.Skip(3)
5993 return _actionsetnwttl, nil
5994}
5995
5996func NewActionSetNwTtl() *ActionSetNwTtl {
5997 obj := &ActionSetNwTtl{
5998 Action: NewAction(23),
5999 }
6000 return obj
6001}
6002func (self *ActionSetNwTtl) GetActionName() string {
6003 return "set_nw_ttl"
6004}
6005
6006func (self *ActionSetNwTtl) GetActionFields() map[string]interface{} {
6007 return map[string]interface{}{
6008 "NwTtl": self.NwTtl,
6009 }
6010}
6011
6012func (self *ActionSetNwTtl) MarshalJSON() ([]byte, error) {
6013 jsonValue, err := json.Marshal(self.GetActionFields())
6014 if err != nil {
6015 return nil, err
6016 }
6017 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
6018}
6019
6020type ActionSetQueue struct {
6021 *Action
6022 QueueId uint32
6023}
6024
6025type IActionSetQueue interface {
6026 goloxi.IAction
6027 GetQueueId() uint32
6028}
6029
6030func (self *ActionSetQueue) GetQueueId() uint32 {
6031 return self.QueueId
6032}
6033
6034func (self *ActionSetQueue) SetQueueId(v uint32) {
6035 self.QueueId = v
6036}
6037
6038func (self *ActionSetQueue) Serialize(encoder *goloxi.Encoder) error {
Jonathan Hart828908c2020-04-15 14:23:45 -07006039 startIndex := len(encoder.Bytes())
Don Newton98fd8812019-09-23 15:15:02 -04006040 if err := self.Action.Serialize(encoder); err != nil {
6041 return err
6042 }
6043
6044 encoder.PutUint32(uint32(self.QueueId))
Jonathan Hart828908c2020-04-15 14:23:45 -07006045 length := len(encoder.Bytes()) - startIndex
Don Newton98fd8812019-09-23 15:15:02 -04006046
Jonathan Hart828908c2020-04-15 14:23:45 -07006047 binary.BigEndian.PutUint16(encoder.Bytes()[startIndex+2:startIndex+4], uint16(length))
Don Newton98fd8812019-09-23 15:15:02 -04006048
6049 return nil
6050}
6051
6052func DecodeActionSetQueue(parent *Action, decoder *goloxi.Decoder) (*ActionSetQueue, error) {
6053 _actionsetqueue := &ActionSetQueue{Action: parent}
6054 if decoder.Length() < 4 {
6055 return nil, fmt.Errorf("ActionSetQueue packet too short: %d < 4", decoder.Length())
6056 }
6057 _actionsetqueue.QueueId = uint32(decoder.ReadUint32())
6058 return _actionsetqueue, nil
6059}
6060
6061func NewActionSetQueue() *ActionSetQueue {
6062 obj := &ActionSetQueue{
6063 Action: NewAction(21),
6064 }
6065 return obj
6066}
6067func (self *ActionSetQueue) GetActionName() string {
6068 return "set_queue"
6069}
6070
6071func (self *ActionSetQueue) GetActionFields() map[string]interface{} {
6072 return map[string]interface{}{
6073 "QueueId": self.QueueId,
6074 }
6075}
6076
6077func (self *ActionSetQueue) MarshalJSON() ([]byte, error) {
6078 jsonValue, err := json.Marshal(self.GetActionFields())
6079 if err != nil {
6080 return nil, err
6081 }
6082 return []byte(fmt.Sprintf("{\"Type\":\"%s\",\"Arguments\":%s}", self.GetActionName(), string(jsonValue))), nil
6083}