X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FLoadBalancerUtil.py;h=6810122257c9a4ffc77395bf9cd95dfa87be2364;hp=c8e6c0ddd7dd532dacf1582db73cfe4cdccd3254;hb=b758131f3cca4047c31d74fe772168b59a56baf1;hpb=d68951ac245150eeefa6e0f4156e4c1b5c9e9325 diff --git a/resources/libraries/python/LoadBalancerUtil.py b/resources/libraries/python/LoadBalancerUtil.py index c8e6c0ddd7..6810122257 100644 --- a/resources/libraries/python/LoadBalancerUtil.py +++ b/resources/libraries/python/LoadBalancerUtil.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Intel and/or its affiliates. +# Copyright (c) 2021 Intel and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -84,13 +84,13 @@ class LoadBalancerUtil: protocol: tcp or udp. (int) port: destination port. (int) encap: encap is ip4 GRE(0) or ip6 (1GRE) or L3DSR(2) or NAT4(3) or - NAT6(4). (int) + NAT6(4). (int) dscp: dscp bit corresponding to VIP type: service type target_port: Pod's port corresponding to specific service node_port: Node's port new_len: Size of the new connections flow table used - for this VIP + for this VIP is_del: 1 if the VIP should be removed otherwise 0. :type node: dict @@ -117,7 +117,7 @@ class LoadBalancerUtil: args = dict( pfx={ u"len": 128, - u"address": {u"un": {u"ip": vip_addr}, u"af": 0} + u"address": {u"un": {u"ip4": vip_addr}, u"af": 0} }, protocol=protocol, port=port, @@ -150,7 +150,7 @@ class LoadBalancerUtil: as_addr: The application server address. (str) is_del: 1 if the VIP should be removed otherwise 0. (int) is_flush: 1 if the sessions related to this AS should be flushed - otherwise 0. (int) + otherwise 0. (int) :type node: dict :type kwargs: dict @@ -174,11 +174,11 @@ class LoadBalancerUtil: args = dict( pfx={ u"len": 128, - u"address": {u"un": {u"ip": vip_addr}, u"af": 0} + u"address": {u"un": {u"ip4": vip_addr}, u"af": 0} }, protocol=protocol, port=port, - as_address={u"un": {u"ip": as_addr}, u"af": 0}, + as_address={u"un": {u"ip4": as_addr}, u"af": 0}, is_del=is_del, is_flush=is_flush )