vmware-archive / idem

Transform configuration into idempotent action
Apache License 2.0
13 stars 3 forks source link

Require doesn't like running in test mode #12

Closed nicholasmhughes closed 4 years ago

nicholasmhughes commented 4 years ago

Azure provider (mirroring the Salt state functionality) returns None in test mode (see last state return below). It looks like idem wants to see True there... so we probably want to be okay with None in test mode.

(env) nmhughes@eitr01:~/dev/idem_azure_demo$ idem --sls azure_demo --test
[INFO    ] An AzureARM Network CloudError has occurred: Azure Error: ResourceGroupNotFound
Message: Resource group 'idem' could not be found.
--------
      ID: Ensure resource group exists
Function: azurerm.resource.group.present
  Result: None
 Comment: Resource group idem would be created.
 Changes: old:
    ----------
new:
    ----------
    name:
        idem
    location:
        eastus
    managed_by:
        None
    tags:
        ----------
        contact_name:
            Elmer Fudd Gantry
--------
      ID: Ensure virtual network exists
Function: azurerm.network.virtual_network.present
  Result: None
 Comment: Virtual network vnet1 would be created.
 Changes: old:
    ----------
new:
    ----------
    name:
        vnet1
    resource_group:
        idem
    address_space:
        ----------
        address_prefixes:
            - 10.0.0.0/8
    dhcp_options:
        ----------
        dns_servers:
            None
    enable_ddos_protection:
        False
    enable_vm_protection:
        False
    tags:
        ----------
        contact_name:
            Elmer Fudd Gantry
--------
      ID: Ensure virtual machine exists
Function: azurerm.compute.virtual_machine.present
  Result: False
 Comment: Result of require azurerm.network.virtual_network_|-Ensure virtual network exists_|-vnet1_|-present is "None", not "True"
 Changes:

Versions:

(env) nmhughes@eitr01:~/dev/idem_azure_demo$ pip freeze | egrep 'idem|pop|rend'
idem==5
pop==7.5
rend==4.1
thatch45 commented 4 years ago

Fixed, comments in commit message