salt-ext-modules-vmware
salt-ext-modules-vmware copied to clipboard
tests.integration.states.test_nsxt_transport_zone : test_state_transport_zone_verify
Fresh VMC_CONFIG file
def test_state_transport_zone_verify(nsxt_config, salt_call_cli):
response_create = salt_call_cli.run(
"state.single",
"nsxt_transport_zone.present",
name="create transport zone",
hostname=nsxt_config["hostname"],
username=nsxt_config["username"],
password=nsxt_config["password"],
host_switch_name="nsxDefaultHostSwitch",
transport_type="OVERLAY",
verify_ssl=False,
display_name=_display_name,
description=_description,
)
result_create = dict(list(response_create.json.values())[0])["result"]
comment_create = dict(list(response_create.json.values())[0])["comment"]
> display_name_response = dict(dict(list(response_create.json.values())[0])["changes"])["new"][
"display_name"
]
E KeyError: 'new'