Browse Source

Merge "Use "datetime.datetime.isoformat" instead of "timeutils.isotime"" into stable/train

changes/57/738057/1
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
05ddfb40db
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      networking_ovn/tests/unit/ml2/test_mech_driver.py

+ 3
- 2
networking_ovn/tests/unit/ml2/test_mech_driver.py View File

@@ -1546,16 +1546,17 @@ class TestOVNMechanismDriver(test_plugin.Ml2PluginV2TestCase):
foo_admin_context, fake_port['id'], const.PORT_STATUS_ACTIVE)

def _add_chassis_agent(self, nb_cfg, agent_type, updated_at=None):
updated_at = updated_at or datetime.datetime.utcnow()
chassis = mock.Mock()
chassis.nb_cfg = nb_cfg
chassis.uuid = uuid.uuid4()
chassis.external_ids = {ovn_const.OVN_LIVENESS_CHECK_EXT_ID_KEY:
timeutils.isotime(updated_at)}
datetime.datetime.isoformat(updated_at)}
if agent_type == ovn_const.OVN_METADATA_AGENT:
chassis.external_ids.update({
ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY: nb_cfg,
ovn_const.METADATA_LIVENESS_CHECK_EXT_ID_KEY:
timeutils.isotime(updated_at)})
datetime.datetime.isoformat(updated_at)})

return chassis



Loading…
Cancel
Save