Skip to content

Commit

Permalink
pi: adapt python library
Browse files Browse the repository at this point in the history
  • Loading branch information
safchain committed Sep 24, 2019
1 parent a531d3e commit 2b128b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contrib/python/api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_install_requires():


setup(name='skydive-client',
version='0.5.0',
version='0.6.0',
description='Skydive Python client library',
url='http://github.com/skydive-project/skydive',
author='Sylvain Afchain',
Expand Down
10 changes: 5 additions & 5 deletions contrib/python/api/skydive/packet_injector.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PacketInjection(object):
def __init__(self, uuid="", src="", dst="", srcip="", dstip="", srcmac="",
dstmac="", srcport=0, dstport=0, type="icmp4", payload="",
trackingid="", icmpid=0, count=1, interval=0,
increment=False, starttime="", ttl=64):
mode=0, starttime="", ttl=64):
self.uuid = uuid
self.src = src
self.dst = dst
Expand All @@ -39,7 +39,7 @@ def __init__(self, uuid="", src="", dst="", srcip="", dstip="", srcmac="",
self.icmpid = icmpid
self.count = count
self.interval = interval
self.increment = increment
self.mode = mode
self.starttime = starttime
self.ttl = ttl

Expand Down Expand Up @@ -76,8 +76,8 @@ def repr_json(self):
obj["Count"] = self.count
if self.interval:
obj["Interval"] = self.interval
if self.increment:
obj["Increment"] = self.increment
if self.mode:
obj["Mode"] = self.mode
if self.ttl:
obj["TTL"] = self.ttl
return obj
Expand All @@ -99,5 +99,5 @@ def from_object(self, obj):
icmpid=obj.get("ICMPID"),
count=obj.get("Count"),
interval=obj.get("Interval"),
increment=obj.get("Increment"),
mode=obj.get("Mode"),
ttl=obj.get("TTL"))

0 comments on commit 2b128b1

Please sign in to comment.