Append default Active Dataset sub-tlvs when Leader forms a partition. (#1039)

* if any Active Dataset sub-tlvs missed, append it with default value.

* if any tlv that would affect the network connectivity included in
  MGMT_ACTIVE_SET.req, but the value is identical with current one,
  take this change as a immediate update.

* update auto-test 9.2.7.
This commit is contained in:
Xiao Ma
2016-12-06 13:29:37 -08:00
committed by Jonathan Hui
parent 28fa90b1ce
commit b3f91ee85f
5 changed files with 134 additions and 39 deletions
@@ -41,7 +41,7 @@ ROUTER = 3
LEADER_ACTIVE_TIMESTAMP = 10
ROUTER_ACTIVE_TIMESTAMP = 20
ROUTER_PENDING_TIMESTAMP = 30
ROUTER_PENDING_ACTIVE_TIMESTAMP = 21
ROUTER_PENDING_ACTIVE_TIMESTAMP = 25
COMMISSIONER_PENDING_CHANNEL = 20
COMMISSIONER_PENDING_PANID = 0xafce
@@ -59,7 +59,6 @@ class Cert_9_2_7_DelayTimer(unittest.TestCase):
self.nodes[COMMISSIONER].enable_whitelist()
self.nodes[COMMISSIONER].set_router_selection_jitter(1)
self.nodes[LEADER].set_active_dataset(LEADER_ACTIVE_TIMESTAMP)
self.nodes[LEADER].set_mode('rsdn')
self.nodes[LEADER].set_panid(PANID_INIT)
self.nodes[LEADER].set_partition_id(0xffffffff)
@@ -88,6 +87,8 @@ class Cert_9_2_7_DelayTimer(unittest.TestCase):
self.nodes[COMMISSIONER].start()
time.sleep(5)
self.assertEqual(self.nodes[COMMISSIONER].get_state(), 'router')
self.nodes[COMMISSIONER].commissioner_start()
time.sleep(20)
self.nodes[ROUTER].start()
time.sleep(10)