Skip to content

Commit

Permalink
Change admin_state
Browse files Browse the repository at this point in the history
* Change admin_state from enable/disable to up/down to match SONiC YANG.

Signed-off-by: Garrick He <garrick_he@dell.com>
  • Loading branch information
GarrickHe committed Oct 17, 2019
1 parent 52ff0b4 commit 5afb6f5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_sflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup_sflow(self, dvs):
self.cdb = swsscommon.DBConnector(4, dvs.redis_sock, 0)
ctbl = swsscommon.Table(self.cdb, "SFLOW")

fvs = swsscommon.FieldValuePairs([("admin_state", "enable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "up")])
ctbl.set("global", fvs)

time.sleep(1)
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_defaultGlobal(self, dvs, testlog):
assert fv[1] == rate

ctbl = swsscommon.Table(self.cdb, "SFLOW")
fvs = swsscommon.FieldValuePairs([("admin_state", "disable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "down")])
ctbl.set("global", fvs)

time.sleep(1)
Expand All @@ -81,7 +81,7 @@ def test_globalAll(self, dvs, testlog):
self.setup_sflow(dvs)

ctbl = swsscommon.Table(self.cdb, "SFLOW_SESSION")
fvs = swsscommon.FieldValuePairs([("admin_state", "disable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "down")])
ctbl.set("all", fvs)

time.sleep(1)
Expand All @@ -99,7 +99,7 @@ def test_globalAll(self, dvs, testlog):

assert sample_session == "oid:0x0"

fvs = swsscommon.FieldValuePairs([("admin_state", "enable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "up")])
ctbl.set("all", fvs)

time.sleep(1)
Expand Down Expand Up @@ -137,7 +137,7 @@ def test_InterfaceSet(self, dvs, testlog):
self.setup_sflow(dvs)
ctbl = swsscommon.Table(self.cdb, "SFLOW_SESSION")
gtbl = swsscommon.Table(self.cdb, "SFLOW")
fvs = swsscommon.FieldValuePairs([("admin_state", "enable"),("sample_rate","1000")])
fvs = swsscommon.FieldValuePairs([("admin_state", "up"),("sample_rate","1000")])
ctbl.set("Ethernet0", fvs)

time.sleep(1)
Expand All @@ -163,7 +163,7 @@ def test_InterfaceSet(self, dvs, testlog):
if fv[0] == "SAI_SAMPLEPACKET_ATTR_SAMPLE_RATE":
assert fv[1] == "1000"

fvs = swsscommon.FieldValuePairs([("admin_state", "disable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "down")])
ctbl.set("all", fvs)

time.sleep(1)
Expand All @@ -180,7 +180,7 @@ def test_InterfaceSet(self, dvs, testlog):
assert sample_session != ""
assert sample_session != "oid:0x0"

fvs = swsscommon.FieldValuePairs([("admin_state", "disable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "down")])
gtbl.set("global", fvs)

time.sleep(1)
Expand All @@ -202,7 +202,7 @@ def test_InterfaceSet(self, dvs, testlog):
def test_defaultRate(self, dvs, testlog):
self.setup_sflow(dvs)
ctbl = swsscommon.Table(self.cdb, "SFLOW_SESSION")
fvs = swsscommon.FieldValuePairs([("admin_state", "enable")])
fvs = swsscommon.FieldValuePairs([("admin_state", "up")])
ctbl.set("Ethernet4", fvs)

time.sleep(1)
Expand Down Expand Up @@ -244,7 +244,7 @@ def test_defaultRate(self, dvs, testlog):
def test_ConfigDel(self, dvs, testlog):
self.setup_sflow(dvs)
ctbl = swsscommon.Table(self.cdb, "SFLOW_SESSION_TABLE")
fvs = swsscommon.FieldValuePairs([("admin_state", "enable"),("sample_rate","1000")])
fvs = swsscommon.FieldValuePairs([("admin_state", "up"),("sample_rate","1000")])
ctbl.set("Ethernet0", fvs)

time.sleep(1)
Expand Down

0 comments on commit 5afb6f5

Please sign in to comment.