salt-ext-modules-vmware icon indicating copy to clipboard operation
salt-ext-modules-vmware copied to clipboard

tests.integration.states.test_nsxt_transport_zone : test_state_transport_zone_verify

Open waynew opened this issue 3 years ago • 0 comments

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'

waynew avatar Dec 01 '21 23:12 waynew