diff options
author | Chris Patterson <cpatterson@microsoft.com> | 2022-02-04 14:17:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 13:17:38 -0600 |
commit | 6d817e94beb404d3917bf973bcb728aa6cc22ffe (patch) | |
tree | ca01446c8dfac1b6b429bd04187d6973255c2d35 /cloudinit/config/cc_salt_minion.py | |
parent | a1cfd1b48993ce912986204f5249eb67724636d5 (diff) | |
download | vyos-cloud-init-6d817e94beb404d3917bf973bcb728aa6cc22ffe.tar.gz vyos-cloud-init-6d817e94beb404d3917bf973bcb728aa6cc22ffe.zip |
sources/azure: fix metadata check in _check_if_nic_is_primary() (#1232)
Currently _check_if_nic_is_primary() checks for imds_md is None,
but imds_md is returned as an empty dictionary on error fetching
metdata.
Fix this check and the tests that are incorrectly vetting IMDS
polling code.
Additionally, use response.contents instead of str(response) when
loding the JSON data returned from readurl. This helps simplify the
mocking and avoids an unncessary conversion.
Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
Diffstat (limited to 'cloudinit/config/cc_salt_minion.py')
0 files changed, 0 insertions, 0 deletions