diff --git a/doc/foo.py b/doc/foo.py deleted file mode 100644 index 6031583267e..00000000000 --- a/doc/foo.py +++ /dev/null @@ -1,258 +0,0 @@ -aix_group -aix_shadow -aixpkg -aliases -alternatives -ansiblegate -apache -aptpkg -apf -archive -arista_pyeapi -artifactory -at -at_solaris -baredoc -bcache -beacons -bridge -cassandra_cql -cassandra_mod -celery -chef -chocolatey -chronos -chroot -cloud -cmdmod -config -cp -cron -cryptdev -data -debconfmod -debian_ip -debian_service -debuild_pkgbuild -defaults -devinfo -devmap -dig -disk -dnsutil -dpkg_lowpkg -environ -etcd_mod -ethtool -event -extfs -file -firewalld -git -gpg -grains -groupadd -hashutil -highstate_doc -hosts -http -idem -incron -ini_manage -iosconfig -ipset -iptables -iwtools -jinja -junos -kernelpkg_linux_apt -kernelpkg_linux_yum -key -keyboard -kmod -linux_acl -linux_ip -linux_lvm -linux_service -linux_shadow -linux_sysctl -localemod -locate -logmod -logrotate -mac_assistive -mac_brew_pkg -mac_desktop -mac_group -mac_keychain -mac_pkgutil -mac_portspkg -mac_power -mac_service -mac_shadow -mac_softwareupdate -mac_sysctl -mac_system -mac_timezone -mac_user -mac_xattr -macdefaults -macpackage -match -mdadm_raid -mine -minion -mod_random -mount -mysql -nacl -napalm_bgp -napalm_formula -napalm_mod -napalm_netacl -napalm_network -napalm_ntp -napalm_probes -napalm_route -napalm_snmp -napalm_users -napalm_yang_mod -netaddress -network -nfs3 -nftables -npm -nxos -nxos_api -nxos_upgrade -oracle -osquery -out -pacmanpkg -pam -parted_partition -pillar -pip -pkg_resource -pkgin -pkgng -pkgutil -postgres -proxy -ps -publish -puppet -pw_group -pw_user -pyenv -quota -rabbitmq -rbac_solaris -rdp -reg -rest_pkg -rest_sample_utils -rest_service -restartcheck -ret -rh_ip -rh_service -rpm_lowpkg -rpmbuild_pkgbuild -rsync -salt_proxy -salt_version -saltcheck -saltcloudmod -saltutil -schedule -scp_mod -scsi -sdb -seed -selinux -slack_notify -slsutil -smbios -smf_service -snapper -solaris_fmadm -solaris_group -solaris_shadow -solaris_system -solaris_user -solarisipspkg -solarispkg -sqlite3 -ssh -ssh_pkg -ssh_service -state -status -supervisord -sysfs -syslog_ng -sysmod -system -systemd_service -temp -test -test_virtual -textfsm_mod -timezone -tls -udev -upstart_service -useradd -vagrant -virtualenv_mod -vsphere -webutil -win_appx -win_auditpol -win_autoruns -win_certutil -win_dacl -win_disk -win_dism -win_dns_client -win_dsc -win_event -win_file -win_firewall -win_groupadd -win_iis -win_ip -win_lgpo -win_lgpo_reg -win_license -win_network -win_ntp -win_path -win_pkg -win_pki -win_powercfg -win_psget -win_servermanager -win_service -win_shadow -win_shortcut -win_smtp_server -win_snmp -win_status -win_system -win_task -win_timezone -win_useradd -win_wua -win_wusa -winrepo -x509 -x509_v2 -xfs -xml -yaml -yumpkg -zk_concurrency -zoneadm -zonecfg diff --git a/doc/meh.txt b/doc/meh.txt deleted file mode 100644 index b7a678163d5..00000000000 --- a/doc/meh.txt +++ /dev/null @@ -1,674 +0,0 @@ -/home/dan/src/salt/doc/ref/auth/all/salt.auth.django.rst -/home/dan/src/salt/doc/ref/auth/all/salt.auth.keystone.rst -/home/dan/src/salt/doc/ref/auth/all/salt.auth.mysql.rst -/home/dan/src/salt/doc/ref/auth/all/salt.auth.yubico.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.adb.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.aix_account.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.avahi_announce.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.bonjour_announce.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.btmp.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.glxinfo.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.haproxy.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.junos_rre_keys.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.napalm_beacon.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.sensehat.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.smartos_imgadm.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.smartos_vmadm.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.telegram_bot_msg.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.twilio_txt_msg.rst -/home/dan/src/salt/doc/ref/beacons/all/salt.beacons.wtmp.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.aliyun.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.clc.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.cloudstack.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.digitalocean.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.dimensiondata.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.ec2.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.gce.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.gogrid.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.hetzner.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.joyent.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.libvirt.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.linode.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.lxc.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.oneandone.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.opennebula.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.openstack.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.packet.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.parallels.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.profitbricks.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.proxmox.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.pyrax.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.qingcloud.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.scaleway.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.softlayer.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.softlayer_hw.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.tencentcloud.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.vagrant.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.virtualbox.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.vmware.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.vultrpy.rst -/home/dan/src/salt/doc/ref/clouds/all/salt.cloud.clouds.xen.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.docker_events.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.fluent.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.http_logstash.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.ircbot.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.junos_syslog.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.libvirt_events.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.logentries.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.logstash_engine.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.napalm_syslog.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.redis_sentinel.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.slack.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.slack_bolt_engine.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.sqs_events.rst -/home/dan/src/salt/doc/ref/engines/all/salt.engines.stalekey.rst -/home/dan/src/salt/doc/ref/executors/all/salt.executors.docker.rst -/home/dan/src/salt/doc/ref/executors/all/salt.executors.transactional_update.rst -/home/dan/src/salt/doc/ref/file_server/all/salt.fileserver.hgfs.rst -/home/dan/src/salt/doc/ref/file_server/all/salt.fileserver.s3fs.rst -/home/dan/src/salt/doc/ref/file_server/all/salt.fileserver.svnfs.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.chronos.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.cimc.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.esxi.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.fibre_channel.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.fx2.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.iscsi.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.junos.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.lvm.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.marathon.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.mdadm.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.mdata.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.metadata.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.metadata_gce.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.napalm.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.nvme.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.nxos.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.panos.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.philips_hue.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.smartos.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.ssh_sample.rst -/home/dan/src/salt/doc/ref/grains/all/salt.grains.zfs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.acme.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.apcups.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.apkpkg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.aptly.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.augeas_cfg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.aws_sqs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.bamboohr.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.bigip.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.bluez_bluetooth.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.bower.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.bsd_shadow.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.btrfs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.cabal.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.capirca_acl.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.ceph.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.chassis.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.cimc.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.ciscoconfparse_mod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.cisconso.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.composer.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.consul.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.container_resource.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.csf.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.cyg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.daemontools.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.datadog_api.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.ddns.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.deb_apache.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.deb_postgres.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.djangomod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.dnsmasq.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.drac.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.dracr.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.drbd.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.dummyproxy_pkg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.dummyproxy_service.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.esxcluster.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.esxi.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsd_sysctl.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsd_update.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsdjail.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsdkmod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsdpkg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsdports.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freebsdservice.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.freezer.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.gcp_addon.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.gem.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.genesis.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.gentoo_service.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.gentoolkitmod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.github.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.glanceng.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.glassfish.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.glusterfs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.google_chat.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.grafana4.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.grub_legacy.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.guestfs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.hadoop.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.haproxyconn.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.heat.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.helm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.hg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.icinga2.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.ifttt.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.ilo.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.influxdb08mod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.influxdbmod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.infoblox.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.inspectlib.entities.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.inspectlib.fsdb.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.inspectlib.kiwiproc.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.inspector.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.introspect.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.ipmi.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.jboss7.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.jboss7_cli.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.jira_mod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.k8s.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.kapacitor.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.kerberos.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.keystone.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.keystore.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.kubeadm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.logadm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.lvs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.lxc.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.lxd.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.makeconf.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.mandrill.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.marathon.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.mattermost.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.mdata.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.memcached.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.modjk.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.mongodb.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.monit.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.moosefs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.mssql.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.msteams.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.munin.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nagios.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nagios_rpc.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.namecheap_domains.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.namecheap_domains_dns.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.namecheap_domains_ns.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.namecheap_ssl.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.namecheap_users.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.netbox.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.netbsd_sysctl.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.netbsdservice.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.netmiko_mod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.netscaler.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.neutron.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.neutronng.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nexus.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nginx.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nilrt_ip.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nix.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nova.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.nspawn.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.omapi.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.openbsd_sysctl.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.openbsdrcctl_service.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.openbsdservice.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.openscap.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.openstack_config.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.openvswitch.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.opkg.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.opsgenie.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pagerduty_util.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.panos.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.parallels.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pcs.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pdbedit.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pecl.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pf.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.philips_hue.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.portage_config.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.postfix.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.poudriere.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.powerpath.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.purefa.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.purefb.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pushbullet.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.pushover_notify.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.qemu_img.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.qemu_nbd.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.rallydev.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.random_org.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.rbenv.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.rebootmgr.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.redismod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.restconf.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.riak.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.runit.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.rvm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.s3.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.s6.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.sensehat.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.sensors.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.serverdensity_device.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.servicenow.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.slackware_service.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.smartos_imgadm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.smartos_nictagadm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.smartos_virt.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.smartos_vmadm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.smtp.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.solr.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.solrcloud.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.splunk.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.splunk_search.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.statuspage.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.suse_apache.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.suse_ip.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.svn.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.swarm.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.swift.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.sysbench.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.sysrc.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.system_profiler.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.telegram.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.telemetry.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.testinframod.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.tomcat.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.trafficserver.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.transactional_update.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.travisci.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.twilio_notify.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.uptime.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.uwsgi.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.varnish.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.vault.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.vbox_guest.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.vboxmanage.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.win_lgpo.rst -/home/dan/src/salt/doc/ref/modules/all/salt.modules.zcbuildout.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.dson.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.newline_values_only.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.no_out_quiet.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.overstatestage.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.pony.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.profile.rst -/home/dan/src/salt/doc/ref/output/all/salt.output.virt_query.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.cmd_json.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.cmd_yaml.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.cmd_yamlex.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.cobbler.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.confidant.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.consul_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.csvpillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.digicert.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.django_orm.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.ec2_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.etcd_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.extra_minion_data_in_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.foreman.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.hg_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.hiera.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.http_json.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.http_yaml.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.libvirt.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.makostack.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.mongo.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.mysql.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.nacl.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.netbox.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.neutron.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.pepa.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.pillar_ldap.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.postgres.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.puppet.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.reclass_adapter.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.redismod.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.rethinkdb_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.s3.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.saltclass.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.sql_base.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.sqlcipher.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.sqlite3.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.stack.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.svn_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.varstack_pillar.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.vault.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.venafi.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.virtkey.rst -/home/dan/src/salt/doc/ref/pillar/all/salt.pillar.vmware_pillar.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.arista_pyeapi.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.chronos.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.cimc.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.cisconso.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.docker.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.dummy.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.esxcluster.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.esxdatacenter.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.esxi.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.esxvm.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.fx2.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.junos.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.marathon.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.napalm.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.netmiko_px.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.nxos.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.nxos_api.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.panos.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.philips_hue.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.rest_sample.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.restconf.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.ssh_sample.rst -/home/dan/src/salt/doc/ref/proxy/all/salt.proxy.vcenter.rst -/home/dan/src/salt/doc/ref/queues/all/salt.queues.pgjsonb_queue.rst -/home/dan/src/salt/doc/ref/queues/all/salt.queues.sqlite_queue.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.aws_kms.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.cheetah.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.dson.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.genshi.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.hjson.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.json5.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.pass.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.pydsl.rst -/home/dan/src/salt/doc/ref/renderers/all/salt.renderers.wempy.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.appoptics_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.carbon_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.cassandra_cql_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.cassandra_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.couchbase_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.couchdb_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.django_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.elasticsearch_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.etcd_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.influxdb_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.kafka_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.librato_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.mattermost_returner.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.memcache_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.mongo_future_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.mongo_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.mysql.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.nagios_nrdp_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.odbc.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.pushover_returner.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.redis_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.sentry_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.slack_returner.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.slack_webhook_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.sms_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.smtp_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.splunk.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.sqlite3_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.telegram_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.xmpp_return.rst -/home/dan/src/salt/doc/ref/returners/all/salt.returners.zabbix_return.rst -/home/dan/src/salt/doc/ref/roster/all/salt.roster.cloud.rst -/home/dan/src/salt/doc/ref/roster/all/salt.roster.clustershell.rst -/home/dan/src/salt/doc/ref/roster/all/salt.roster.terraform.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.asam.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.bgp.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.cloud.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.ddns.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.digicertapi.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.drac.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.f5.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.launchd.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.lxc.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.mattermost.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.nacl.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.pagerduty.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.pkg.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.smartos_vmadm.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.spacewalk.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.thin.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.vault.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.venafiapi.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.virt.rst -/home/dan/src/salt/doc/ref/runners/all/salt.runners.vistara.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.cache.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.confidant.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.consul.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.couchdb.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.etcd_db.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.keyring_db.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.memcached.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.redis_sdb.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.rest.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.sqlite3.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.tism.rst -/home/dan/src/salt/doc/ref/sdb/all/salt.sdb.vault.rst -/home/dan/src/salt/doc/ref/serializers/all/salt.serializers.configparser.rst -/home/dan/src/salt/doc/ref/serializers/all/salt.serializers.keyvalue.rst -/home/dan/src/salt/doc/ref/serializers/all/salt.serializers.plist.rst -/home/dan/src/salt/doc/ref/serializers/all/salt.serializers.python.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.acme.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.alias.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.alternatives.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.aptpkg.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.artifactory.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.augeas.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.aws_sqs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.bigip.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.blockdev.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto3_elasticache.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto3_elasticsearch.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto3_route53.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto3_sns.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_apigateway.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_asg.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_cfn.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_cloudfront.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_cloudtrail.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_cloudwatch_alarm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_cloudwatch_event.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_cognitoidentity.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_datapipeline.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_dynamodb.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_ec2.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_elasticache.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_elasticsearch_domain.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_elb.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_elbv2.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_iam.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_iam_role.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_iot.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_kinesis.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_kms.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_lambda.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_lc.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_rds.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_route53.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_s3.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_s3_bucket.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_secgroup.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_sns.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_sqs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.boto_vpc.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.bower.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.btrfs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.cabal.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ceph.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.chef.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.chronos_job.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.cimc.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.cisconso.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.composer.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.consul.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.cryptdev.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.csf.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.cyg.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ddns.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.debconfmod.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.dellchassis.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.docker_container.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.docker_image.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.docker_network.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.docker_volume.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.drac.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.dvs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.elasticsearch.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.elasticsearch_index.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.elasticsearch_index_template.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.eselect.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.esxcluster.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.esxdatacenter.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.esxi.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.esxvm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ethtool.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.gem.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.github.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.glance_image.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.glassfish.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.glusterfs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.gnomedesktop.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana4_dashboard.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana4_datasource.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana4_org.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana4_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana_dashboard.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.grafana_datasource.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.heat.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.helm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.hg.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.icinga2.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ifttt.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.incron.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.influxdb08_database.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.influxdb08_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.influxdb_continuous_query.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.influxdb_database.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.influxdb_retention_policy.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.influxdb_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.infoblox_a.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.infoblox_cname.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.infoblox_host_record.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.infoblox_range.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ipmi.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.jboss7.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.jenkins.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.junos.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.kapacitor.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.kernelpkg.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_domain.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_endpoint.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_group.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_project.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_role.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_role_grant.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_service.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystone_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.keystore.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.kubernetes.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.layman.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ldap.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.libcloud_dns.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.libcloud_loadbalancer.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.libcloud_storage.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.logadm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lvs_server.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lvs_service.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lxc.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lxd.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lxd_container.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lxd_image.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.lxd_profile.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.marathon_app.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.memcached.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.modjk.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.modjk_worker.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mongodb_database.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mongodb_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.monit.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mssql_database.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mssql_login.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mssql_role.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mssql_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.msteams.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mysql_database.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mysql_grants.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mysql_query.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.mysql_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.net_napalm_yang.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.neutron_network.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.neutron_secgroup.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.neutron_secgroup_rule.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.neutron_subnet.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.nexus.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.nfs_export.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.npm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.nxos.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.nxos_upgrade.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.openstack_config.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.openvswitch_bridge.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.openvswitch_db.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.openvswitch_port.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.opsgenie.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pagerduty.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pagerduty_escalation_policy.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pagerduty_schedule.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pagerduty_service.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pagerduty_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.panos.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pbm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pcs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pdbedit.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pecl.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.portage_config.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.ports.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.powerpath.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.probes.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pushover.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.pyrax_queues.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.rbac_solaris.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.rbenv.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.rdp.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.redismod.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.restconf.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.rsync.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.rvm.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.serverdensity_device.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.slack.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.smartos.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.smtp.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.snapper.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.solrcloud.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.splunk.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.splunk_search.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.sqlite3.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.statuspage.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.supervisord.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.svn.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.sysrc.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.telemetry_alert.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.testinframod.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.tomcat.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.trafficserver.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.tuned.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.vagrant.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.vault.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.vbox_guest.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.victorops.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.virt.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.virtualenv_mod.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.webutil.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.wordpress.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.xml.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.xmpp.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_action.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_host.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_hostgroup.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_mediatype.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_template.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_user.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_usergroup.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_usermacro.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zabbix_valuemap.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zcbuildout.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zenoss.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zfs.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zk_concurrency.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zone.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zookeeper.rst -/home/dan/src/salt/doc/ref/states/all/salt.states.zpool.rst diff --git a/doc/ref/modules/all/index.rst b/doc/ref/modules/all/index.rst index 398032b6846..b794d724639 100644 --- a/doc/ref/modules/all/index.rst +++ b/doc/ref/modules/all/index.rst @@ -64,6 +64,8 @@ execution modules disk dnsutil dpkg_lowpkg + dummyproxy_pkg + dummyproxy_service environ etcd_mod ethtool diff --git a/doc/ref/modules/all/salt.modules.dummyproxy_pkg.rst b/doc/ref/modules/all/salt.modules.dummyproxy_pkg.rst new file mode 100644 index 00000000000..41b09665b94 --- /dev/null +++ b/doc/ref/modules/all/salt.modules.dummyproxy_pkg.rst @@ -0,0 +1,6 @@ +salt.modules.dummyproxy_pkg +=========================== + +.. automodule:: salt.modules.dummyproxy_pkg + :members: + :undoc-members: diff --git a/doc/ref/modules/all/salt.modules.dummyproxy_service.rst b/doc/ref/modules/all/salt.modules.dummyproxy_service.rst new file mode 100644 index 00000000000..73ec764eb35 --- /dev/null +++ b/doc/ref/modules/all/salt.modules.dummyproxy_service.rst @@ -0,0 +1,6 @@ +salt.modules.dummyproxy_service +=============================== + +.. automodule:: salt.modules.dummyproxy_service + :members: + :undoc-members: diff --git a/doc/ref/pillar/all/index.rst b/doc/ref/pillar/all/index.rst index d3fd1ce44af..bf9f6f5803e 100644 --- a/doc/ref/pillar/all/index.rst +++ b/doc/ref/pillar/all/index.rst @@ -10,6 +10,9 @@ pillar modules :toctree: :template: autosummary.rst.tmpl + cmd_json + cmd_yaml + extra_minion_data_in_pillar file_tree git_pillar gpg diff --git a/doc/ref/pillar/all/salt.pillar.cmd_json.rst b/doc/ref/pillar/all/salt.pillar.cmd_json.rst new file mode 100644 index 00000000000..16a3fae8396 --- /dev/null +++ b/doc/ref/pillar/all/salt.pillar.cmd_json.rst @@ -0,0 +1,5 @@ +salt.pillar.cmd_json +==================== + +.. automodule:: salt.pillar.cmd_json + :members: diff --git a/doc/ref/pillar/all/salt.pillar.cmd_yaml.rst b/doc/ref/pillar/all/salt.pillar.cmd_yaml.rst new file mode 100644 index 00000000000..0c92e515b6c --- /dev/null +++ b/doc/ref/pillar/all/salt.pillar.cmd_yaml.rst @@ -0,0 +1,5 @@ +salt.pillar.cmd_yaml +==================== + +.. automodule:: salt.pillar.cmd_yaml + :members: diff --git a/doc/ref/pillar/all/salt.pillar.extra_minion_data_in_pillar.rst b/doc/ref/pillar/all/salt.pillar.extra_minion_data_in_pillar.rst new file mode 100644 index 00000000000..c0656d23451 --- /dev/null +++ b/doc/ref/pillar/all/salt.pillar.extra_minion_data_in_pillar.rst @@ -0,0 +1,5 @@ +salt.pillar.extra_minion_data_in_pillar +======================================= + +.. automodule:: salt.pillar.extra_minion_data_in_pillar + :members: diff --git a/doc/ref/pillar/all/salt.pillar.postgres.rst b/doc/ref/pillar/all/salt.pillar.postgres.rst new file mode 100644 index 00000000000..8eaeab71ca1 --- /dev/null +++ b/doc/ref/pillar/all/salt.pillar.postgres.rst @@ -0,0 +1,6 @@ +==================== +salt.pillar.postgres +==================== + +.. automodule:: salt.pillar.postgres + :members: diff --git a/doc/ref/pillar/all/salt.pillar.sql_base.rst b/doc/ref/pillar/all/salt.pillar.sql_base.rst new file mode 100644 index 00000000000..792126c300f --- /dev/null +++ b/doc/ref/pillar/all/salt.pillar.sql_base.rst @@ -0,0 +1,6 @@ +==================== +salt.pillar.sql_base +==================== + +.. automodule:: salt.pillar.sql_base + :members: diff --git a/doc/ref/proxy/all/index.rst b/doc/ref/proxy/all/index.rst index efcf105556d..f1f06b3bb6a 100644 --- a/doc/ref/proxy/all/index.rst +++ b/doc/ref/proxy/all/index.rst @@ -11,3 +11,4 @@ proxy modules :template: autosummary.rst.tmpl deltaproxy + dummy diff --git a/doc/ref/proxy/all/salt.proxy.dummy.rst b/doc/ref/proxy/all/salt.proxy.dummy.rst new file mode 100644 index 00000000000..b5b8f370beb --- /dev/null +++ b/doc/ref/proxy/all/salt.proxy.dummy.rst @@ -0,0 +1,6 @@ +salt.proxy.dummy +================ + +.. automodule:: salt.proxy.dummy + :members: + :undoc-members: diff --git a/doc/ref/serializers/all/salt.serializers.configparser.rst b/doc/ref/serializers/all/salt.serializers.configparser.rst index c87e748586c..3a9339a52e7 100644 --- a/doc/ref/serializers/all/salt.serializers.configparser.rst +++ b/doc/ref/serializers/all/salt.serializers.configparser.rst @@ -1,6 +1,6 @@ -============================= salt.serializers.configparser ============================= .. automodule:: salt.serializers.configparser :members: + :noindex: salt.serializers.DeserializationError salt.serializers.SerializationError diff --git a/doc/ref/serializers/all/salt.serializers.json.rst b/doc/ref/serializers/all/salt.serializers.json.rst index 47e5b58b46e..333bde7b64b 100644 --- a/doc/ref/serializers/all/salt.serializers.json.rst +++ b/doc/ref/serializers/all/salt.serializers.json.rst @@ -3,3 +3,4 @@ salt.serializers.json .. automodule:: salt.serializers.json :members: + :noindex: salt.serializers.DeserializationError salt.serializers.SerializationError diff --git a/doc/ref/serializers/all/salt.serializers.msgpack.rst b/doc/ref/serializers/all/salt.serializers.msgpack.rst index 8c97e23134a..2e177b4b1df 100644 --- a/doc/ref/serializers/all/salt.serializers.msgpack.rst +++ b/doc/ref/serializers/all/salt.serializers.msgpack.rst @@ -3,3 +3,4 @@ salt.serializers.msgpack .. automodule:: salt.serializers.msgpack :members: + :noindex: salt.serializers.DeserializationError salt.serializers.SerializationError diff --git a/doc/ref/states/all/index.rst b/doc/ref/states/all/index.rst index 263fd4d137d..0d9c9a3683f 100644 --- a/doc/ref/states/all/index.rst +++ b/doc/ref/states/all/index.rst @@ -108,6 +108,7 @@ state modules tls uptime user + virtualenv_mod win_appx win_certutil win_dacl diff --git a/doc/ref/states/all/salt.states.virtualenv_mod.rst b/doc/ref/states/all/salt.states.virtualenv_mod.rst new file mode 100644 index 00000000000..c3e69ec50d4 --- /dev/null +++ b/doc/ref/states/all/salt.states.virtualenv_mod.rst @@ -0,0 +1,6 @@ +salt.states.virtualenv +====================== + +.. automodule:: salt.states.virtualenv_mod + :members: + :exclude-members: manage diff --git a/requirements/zeromq.txt b/requirements/zeromq.txt index ce2710db585..3909ce8040e 100644 --- a/requirements/zeromq.txt +++ b/requirements/zeromq.txt @@ -1,4 +1,3 @@ -r base.txt -r crypto.txt - pyzmq>=25.1.2 diff --git a/salt/modules/slsutil.py b/salt/modules/slsutil.py index 8852ca0bdf2..10d251a4a36 100644 --- a/salt/modules/slsutil.py +++ b/salt/modules/slsutil.py @@ -1,6 +1,7 @@ """ Utility functions for use with or in SLS files """ + import logging import os import posixpath @@ -162,36 +163,31 @@ def renderer(path=None, string=None, default_renderer="jinja|yaml", **kwargs): salt '*' slsutil.renderer string='Inline template! {{ saltenv }}' salt '*' slsutil.renderer string='Hello, {{ name }}.' name='world' """ - try: - if not path and not string: - raise salt.exceptions.SaltInvocationError("Must pass either path or string") + if not path and not string: + raise salt.exceptions.SaltInvocationError("Must pass path or string.") - if path and string: - raise salt.exceptions.SaltInvocationError( - "Must not pass both path and string" - ) + if path and string: + raise salt.exceptions.SaltInvocationError("Must not pass both path and string.") - renderers = salt.loader.render(__opts__, __salt__) + renderers = salt.loader.render(__opts__, __salt__) - if path: - path_or_string = __salt__["cp.get_url"]( - path, saltenv=kwargs.get("saltenv", "base") - ) - if string: - path_or_string = ":string:" - kwargs["input_data"] = string - - ret = salt.template.compile_template( - path_or_string, - renderers, - default_renderer, - __opts__["renderer_blacklist"], - __opts__["renderer_whitelist"], - **kwargs, + if path: + path_or_string = __salt__["cp.get_url"]( + path, saltenv=kwargs.get("saltenv", "base") ) - return ret.read() if __utils__["stringio.is_readable"](ret) else ret - except Exception as exc: - log.error("WTF", exc_info=True) + if string: + path_or_string = ":string:" + kwargs["input_data"] = string + + ret = salt.template.compile_template( + path_or_string, + renderers, + default_renderer, + __opts__["renderer_blacklist"], + __opts__["renderer_whitelist"], + **kwargs, + ) + return ret.read() if __utils__["stringio.is_readable"](ret) else ret def _get_serialize_fn(serializer, fn_name): diff --git a/salt/pillar/cmd_json.py b/salt/pillar/cmd_json.py new file mode 100644 index 00000000000..50fbdee27f4 --- /dev/null +++ b/salt/pillar/cmd_json.py @@ -0,0 +1,46 @@ +""" +Execute a command and read the output as JSON. The JSON data is then directly overlaid onto the minion's Pillar data. + + +Configuring the CMD_JSON ext_pillar +==================================== + +Set the following Salt config to setup cmd json result as external pillar source: + +.. code-block:: yaml + + ext_pillar: + - cmd_json: 'echo {\"arg\":\"value\"}' + +This will run the command ``echo {arg: value}`` on the master. + + +Module Documentation +==================== + +""" + +import logging + +import salt.utils.json + +# Don't "fix" the above docstring to put it on two lines, as the sphinx +# autosummary pulls only the first line for its description. + + +# Set up logging +log = logging.getLogger(__name__) + + +def ext_pillar( + minion_id, pillar, command # pylint: disable=W0613 # pylint: disable=W0613 +): + """ + Execute a command and read the output as JSON + """ + try: + command = command.replace("%s", minion_id) + return salt.utils.json.loads(__salt__["cmd.run"](command)) + except Exception: # pylint: disable=broad-except + log.critical("JSON data from %s failed to parse", command) + return {} diff --git a/salt/pillar/cmd_yaml.py b/salt/pillar/cmd_yaml.py new file mode 100644 index 00000000000..6a474a95c2d --- /dev/null +++ b/salt/pillar/cmd_yaml.py @@ -0,0 +1,31 @@ +""" +Execute a command and read the output as YAML. The YAML data is then directly overlaid onto the minion's Pillar data +""" + +import logging + +import salt.utils.yaml + +# Don't "fix" the above docstring to put it on two lines, as the sphinx +# autosummary pulls only the first line for its description. + + +# Set up logging +log = logging.getLogger(__name__) + + +def ext_pillar( + minion_id, pillar, command # pylint: disable=W0613 # pylint: disable=W0613 +): + """ + Execute a command and read the output as YAML + """ + try: + command = command.replace("%s", minion_id) + output = __salt__["cmd.run_stdout"](command, python_shell=True) + return salt.utils.yaml.safe_load(output) + except Exception: # pylint: disable=broad-except + log.critical( + "YAML data from '%s' failed to parse. Command output:\n%s", command, output + ) + return {} diff --git a/salt/pillar/extra_minion_data_in_pillar.py b/salt/pillar/extra_minion_data_in_pillar.py index 170cdb6fa08..457c79462b0 100644 --- a/salt/pillar/extra_minion_data_in_pillar.py +++ b/salt/pillar/extra_minion_data_in_pillar.py @@ -27,6 +27,7 @@ Complete example in etc/salt/master include: """ + import logging # Set up logging diff --git a/salt/proxy/dummy.py b/salt/proxy/dummy.py index d470c1082a7..12d71104a0a 100644 --- a/salt/proxy/dummy.py +++ b/salt/proxy/dummy.py @@ -30,7 +30,7 @@ def __virtual__(): def _save_state(opts, details): _id = __context__["dummy_proxy"]["id"] - cachefile = os.path.join(opts["cachedir"], "dummy-proxy-{}.cache".format(_id)) + cachefile = os.path.join(opts["cachedir"], f"dummy-proxy-{_id}.cache") with salt.utils.files.fopen(cachefile, "wb") as pck: pck.write(salt.utils.msgpack.packb(details, use_bin_type=True)) log.warning("Dummy Proxy Saved State(%s):\n%s", cachefile, pprint.pformat(details)) @@ -38,7 +38,7 @@ def _save_state(opts, details): def _load_state(opts): _id = __context__["dummy_proxy"]["id"] - cachefile = os.path.join(opts["cachedir"], "dummy-proxy-{}.cache".format(_id)) + cachefile = os.path.join(opts["cachedir"], f"dummy-proxy-{_id}.cache") try: with salt.utils.files.fopen(cachefile, "rb") as pck: state = salt.utils.msgpack.unpackb(pck.read(), raw=False) @@ -95,7 +95,7 @@ def init(opts): __context__["dummy_proxy"] = {"id": opts["id"]} log.debug("dummy proxy init() called...") with _loaded_state(opts) as state: - state["initialized"] = True + state["initialized"] = True # pylint: disable=unsupported-assignment-operation def initialized(): @@ -113,12 +113,12 @@ def grains(): Make up some grains """ with _loaded_state(__opts__) as state: - if "grains_cache" not in state: - state["grains_cache"] = { - "dummy_grain_1": "one", - "dummy_grain_2": "two", - "dummy_grain_3": "three", - } + # pylint: disable=unsupported-assignment-operation,unsupported-membership-test + state["grains_cache"] = { + "dummy_grain_1": "one", + "dummy_grain_2": "two", + "dummy_grain_3": "three", + } return state["grains_cache"] @@ -127,7 +127,7 @@ def grains_refresh(): Refresh the grains """ with _loaded_state(__opts__) as state: - if "grains_cache" in state: + if "grains_cache" in state: # pylint: disable=unsupported-membership-test state.pop("grains_cache") return grains() @@ -262,7 +262,7 @@ def shutdown(opts): """ log.debug("dummy proxy shutdown() called...") with _loaded_state(__opts__) as state: - if "filename" in state: + if "filename" in state: # pylint: disable=unsupported-membership-test os.unlink(state["filename"]) diff --git a/salt/roster/range.py b/salt/roster/range.py index 3f039dcef42..0633d56e389 100644 --- a/salt/roster/range.py +++ b/salt/roster/range.py @@ -24,7 +24,7 @@ try: HAS_RANGE = True except ImportError: - log.error("Unable to load range library") + log.warning("Unable to load range library") # pylint: enable=import-error diff --git a/salt/states/virtualenv_mod.py b/salt/states/virtualenv_mod.py new file mode 100644 index 00000000000..957f44265bc --- /dev/null +++ b/salt/states/virtualenv_mod.py @@ -0,0 +1,348 @@ +""" +Setup of Python virtualenv sandboxes. + +.. versionadded:: 0.17.0 +""" + +import logging +import os + +import salt.utils.functools +import salt.utils.platform +import salt.utils.versions +import salt.version +from salt.exceptions import CommandExecutionError, CommandNotFoundError + +log = logging.getLogger(__name__) + +# Define the module's virtual name +__virtualname__ = "virtualenv" + + +def __virtual__(): + if "virtualenv.create" in __salt__: + return __virtualname__ + return (False, "virtualenv module could not be loaded") + + +def managed( + name, + venv_bin=None, + requirements=None, + system_site_packages=False, + distribute=False, + use_wheel=False, + clear=False, + python=None, + extra_search_dir=None, + never_download=None, + prompt=None, + user=None, + cwd=None, + index_url=None, + extra_index_url=None, + pre_releases=False, + no_deps=False, + pip_download=None, + pip_download_cache=None, + pip_exists_action=None, + pip_ignore_installed=False, + proxy=None, + use_vt=False, + env_vars=None, + no_use_wheel=False, + pip_upgrade=False, + pip_pkgs=None, + pip_no_cache_dir=False, + pip_cache_dir=None, + process_dependency_links=False, + no_binary=None, + **kwargs, +): + """ + Create a virtualenv and optionally manage it with pip + + name + Path to the virtualenv. + + venv_bin: virtualenv + The name (and optionally path) of the virtualenv command. This can also + be set globally in the minion config file as ``virtualenv.venv_bin``. + + requirements: None + Path to a pip requirements file. If the path begins with ``salt://`` + the file will be transferred from the master file server. + + use_wheel: False + Prefer wheel archives (requires pip >= 1.4). + + python: None + Python executable used to build the virtualenv + + user: None + The user under which to run virtualenv and pip. + + cwd: None + Path to the working directory where `pip install` is executed. + + no_deps: False + Pass `--no-deps` to `pip install`. + + pip_exists_action: None + Default action of pip when a path already exists: (s)witch, (i)gnore, + (w)ipe, (b)ackup. + + proxy: None + Proxy address which is passed to `pip install`. + + env_vars: None + Set environment variables that some builds will depend on. For example, + a Python C-module may have a Makefile that needs INCLUDE_PATH set to + pick up a header file while compiling. + + no_use_wheel: False + Force to not use wheel archives (requires pip>=1.4) + + no_binary + Force to not use binary packages (requires pip >= 7.0.0) + Accepts either :all: to disable all binary packages, :none: to empty the set, + or a list of one or more packages + + pip_upgrade: False + Pass `--upgrade` to `pip install`. + + pip_pkgs: None + As an alternative to `requirements`, pass a list of pip packages that + should be installed. + + process_dependency_links: False + Run pip install with the --process_dependency_links flag. + + .. versionadded:: 2017.7.0 + + Also accepts any kwargs that the virtualenv module will. However, some + kwargs, such as the ``pip`` option, require ``- distribute: True``. + + .. code-block:: yaml + + /var/www/myvirtualenv.com: + virtualenv.managed: + - system_site_packages: False + - requirements: salt://REQUIREMENTS.txt + - env_vars: + PATH_VAR: '/usr/local/bin/' + """ + ret = {"name": name, "result": True, "comment": "", "changes": {}} + + if "virtualenv.create" not in __salt__: + ret["result"] = False + ret["comment"] = "Virtualenv was not detected on this system" + return ret + + if salt.utils.platform.is_windows(): + venv_py = os.path.join(name, "Scripts", "python.exe") + else: + venv_py = os.path.join(name, "bin", "python") + venv_exists = os.path.exists(venv_py) + + # Bail out early if the specified requirements file can't be found + if requirements and requirements.startswith("salt://"): + cached_requirements = __salt__["cp.is_cached"](requirements, __env__) + if not cached_requirements: + # It's not cached, let's cache it. + cached_requirements = __salt__["cp.cache_file"](requirements, __env__) + # Check if the master version has changed. + if cached_requirements and __salt__["cp.hash_file"]( + requirements, __env__ + ) != __salt__["cp.hash_file"](cached_requirements, __env__): + cached_requirements = __salt__["cp.cache_file"](requirements, __env__) + if not cached_requirements: + ret.update( + { + "result": False, + "comment": "pip requirements file '{}' not found".format( + requirements + ), + } + ) + return ret + requirements = cached_requirements + + # If it already exists, grab the version for posterity + if venv_exists and clear: + ret["changes"]["cleared_packages"] = __salt__["pip.freeze"](bin_env=name) + ret["changes"]["old"] = __salt__["cmd.run_stderr"](f"{venv_py} -V").strip("\n") + + # Create (or clear) the virtualenv + if __opts__["test"]: + if venv_exists and clear: + ret["result"] = None + ret["comment"] = f"Virtualenv {name} is set to be cleared" + return ret + if venv_exists and not clear: + ret["comment"] = f"Virtualenv {name} is already created" + return ret + ret["result"] = None + ret["comment"] = f"Virtualenv {name} is set to be created" + return ret + + if not venv_exists or (venv_exists and clear): + try: + venv_ret = __salt__["virtualenv.create"]( + name, + venv_bin=venv_bin, + system_site_packages=system_site_packages, + distribute=distribute, + clear=clear, + python=python, + extra_search_dir=extra_search_dir, + never_download=never_download, + prompt=prompt, + user=user, + use_vt=use_vt, + **kwargs, + ) + except CommandNotFoundError as err: + ret["result"] = False + ret["comment"] = f"Failed to create virtualenv: {err}" + return ret + + if venv_ret["retcode"] != 0: + ret["result"] = False + ret["comment"] = venv_ret["stdout"] + venv_ret["stderr"] + return ret + + ret["result"] = True + ret["changes"]["new"] = __salt__["cmd.run_stderr"](f"{venv_py} -V").strip("\n") + + if clear: + ret["comment"] = "Cleared existing virtualenv" + else: + ret["comment"] = "Created new virtualenv" + + elif venv_exists: + ret["comment"] = "virtualenv exists" + + # Check that the pip binary supports the 'use_wheel' option + if use_wheel: + min_version = "1.4" + max_version = "9.0.3" + cur_version = __salt__["pip.version"](bin_env=name) + too_low = salt.utils.versions.compare( + ver1=cur_version, oper="<", ver2=min_version + ) + too_high = salt.utils.versions.compare( + ver1=cur_version, oper=">", ver2=max_version + ) + if too_low or too_high: + ret["result"] = False + ret["comment"] = ( + "The 'use_wheel' option is only supported in " + "pip between {} and {}. The version of pip detected " + "was {}.".format(min_version, max_version, cur_version) + ) + return ret + + # Check that the pip binary supports the 'no_use_wheel' option + if no_use_wheel: + min_version = "1.4" + max_version = "9.0.3" + cur_version = __salt__["pip.version"](bin_env=name) + too_low = salt.utils.versions.compare( + ver1=cur_version, oper="<", ver2=min_version + ) + too_high = salt.utils.versions.compare( + ver1=cur_version, oper=">", ver2=max_version + ) + if too_low or too_high: + ret["result"] = False + ret["comment"] = ( + "The 'no_use_wheel' option is only supported in " + "pip between {} and {}. The version of pip detected " + "was {}.".format(min_version, max_version, cur_version) + ) + return ret + + # Check that the pip binary supports the 'no_binary' option + if no_binary: + min_version = "7.0.0" + cur_version = __salt__["pip.version"](bin_env=name) + too_low = salt.utils.versions.compare( + ver1=cur_version, oper="<", ver2=min_version + ) + if too_low: + ret["result"] = False + ret["comment"] = ( + "The 'no_binary' option is only supported in " + "pip {} and newer. The version of pip detected " + "was {}.".format(min_version, cur_version) + ) + return ret + + # Populate the venv via a requirements file + if requirements or pip_pkgs: + try: + before = set(__salt__["pip.freeze"](bin_env=name, user=user, use_vt=use_vt)) + except CommandExecutionError as exc: + ret["result"] = False + ret["comment"] = exc.strerror + return ret + + if requirements: + + if isinstance(requirements, str): + req_canary = requirements.split(",")[0] + elif isinstance(requirements, list): + req_canary = requirements[0] + else: + raise TypeError("pip requirements must be either a string or a list") + + if req_canary != os.path.abspath(req_canary): + cwd = os.path.dirname(os.path.abspath(req_canary)) + + pip_ret = __salt__["pip.install"]( + pkgs=pip_pkgs, + requirements=requirements, + process_dependency_links=process_dependency_links, + bin_env=name, + use_wheel=use_wheel, + no_use_wheel=no_use_wheel, + no_binary=no_binary, + user=user, + cwd=cwd, + index_url=index_url, + extra_index_url=extra_index_url, + download=pip_download, + download_cache=pip_download_cache, + pre_releases=pre_releases, + exists_action=pip_exists_action, + ignore_installed=pip_ignore_installed, + upgrade=pip_upgrade, + no_deps=no_deps, + proxy=proxy, + use_vt=use_vt, + env_vars=env_vars, + no_cache_dir=pip_no_cache_dir, + cache_dir=pip_cache_dir, + **kwargs, + ) + ret["result"] &= pip_ret["retcode"] == 0 + if pip_ret["retcode"] > 0: + ret["comment"] = "{}\n{}\n{}".format( + ret["comment"], pip_ret["stdout"], pip_ret["stderr"] + ) + + after = set(__salt__["pip.freeze"](bin_env=name)) + + new = list(after - before) + old = list(before - after) + + if new or old: + ret["changes"]["packages"] = { + "new": new if new else "", + "old": old if old else "", + } + return ret + + +manage = salt.utils.functools.alias_function(managed, "manage") diff --git a/tests/filename_map.yml b/tests/filename_map.yml index e64b45923a7..a61794d0473 100644 --- a/tests/filename_map.yml +++ b/tests/filename_map.yml @@ -278,9 +278,6 @@ salt/(cli/spm\.py|spm/.+): - integration.spm.test_remove - integration.spm.test_repo -salt/utils/docker/*: - - unit.utils.test_dockermod - salt/utils/schedule.py: - pytests.unit.utils.scheduler.test_error - pytests.unit.utils.scheduler.test_eval @@ -313,10 +310,6 @@ salt/(minion\.py|channel/.+|transport/.+): tests/support/mock.py: - unit.test_mock -tests/support/pytest/mysql.py: - - pytests.functional.states.test_mysql - - pytests.functional.modules.test_mysql - tests/support/pytest/transport.py: - pytests.functional.transport.ipc.test_pub_server_channel - pytests.functional.transport.zeromq.test_pub_server_channel diff --git a/tests/integration/output/test_output.py b/tests/integration/output/test_output.py index 615d2c41b82..463241c9eb7 100644 --- a/tests/integration/output/test_output.py +++ b/tests/integration/output/test_output.py @@ -41,6 +41,7 @@ class OutputReturnTest(ShellCase): ret = self.run_call("test.ping --out=nested") self.assertEqual(ret, expected) + @pytest.mark.skip("GREAT MODULE MIGRATION") @pytest.mark.slow_test def test_output_quiet(self): """ diff --git a/tests/pytests/functional/formulas/test_nginx.py b/tests/pytests/functional/formulas/test_nginx.py index 0cd8324893c..de9cb3ffdbc 100644 --- a/tests/pytests/functional/formulas/test_nginx.py +++ b/tests/pytests/functional/formulas/test_nginx.py @@ -25,6 +25,10 @@ def modules(loaders, _formula): @pytest.mark.skip_on_windows @pytest.mark.destructive_test +@pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", +) def test_formula(modules): ret = modules.state.sls("nginx") assert not ret.errors diff --git a/tests/pytests/functional/formulas/test_sudoers.py b/tests/pytests/functional/formulas/test_sudoers.py index caeace8d853..0977f818103 100644 --- a/tests/pytests/functional/formulas/test_sudoers.py +++ b/tests/pytests/functional/formulas/test_sudoers.py @@ -21,6 +21,10 @@ def modules(loaders, _formula): @pytest.mark.skip_on_windows @pytest.mark.destructive_test +@pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", +) def test_sudoers_formula(modules): ret = modules.state.sls("sudoers") assert not ret.errors diff --git a/tests/pytests/functional/formulas/test_users.py b/tests/pytests/functional/formulas/test_users.py index e30e34b95ee..2b875b87473 100644 --- a/tests/pytests/functional/formulas/test_users.py +++ b/tests/pytests/functional/formulas/test_users.py @@ -21,6 +21,10 @@ def modules(loaders, _formula): @pytest.mark.skip_on_windows @pytest.mark.destructive_test +@pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", +) def test_users_formula(modules): # sudo ret = modules.state.sls("users.sudo") diff --git a/tests/pytests/functional/formulas/test_vim.py b/tests/pytests/functional/formulas/test_vim.py index 83d2354dff0..6d4ae8667c2 100644 --- a/tests/pytests/functional/formulas/test_vim.py +++ b/tests/pytests/functional/formulas/test_vim.py @@ -25,6 +25,10 @@ def modules(loaders, _formula): 'grains["oscodename"] == "Photon"', reason="vim package not available for this distrubition", ) +@pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", +) def test_vim_formula(modules): ret = modules.state.sls("vim") assert not ret.errors diff --git a/tests/pytests/functional/modules/state/test_state.py b/tests/pytests/functional/modules/state/test_state.py index e5e104ffcca..7497892e807 100644 --- a/tests/pytests/functional/modules/state/test_state.py +++ b/tests/pytests/functional/modules/state/test_state.py @@ -615,6 +615,7 @@ def test_template_str_invalid_items(state, item): assert errmsg in ret.errors +@pytest.mark.skip("GREAT MODULE MIGRATION") @pytest.mark.skip_on_windows( reason=( "Functional testing this on windows raises unicode errors. " diff --git a/tests/pytests/functional/modules/test_dockermod.py b/tests/pytests/functional/modules/test_dockermod.py deleted file mode 100644 index 7d66379de0c..00000000000 --- a/tests/pytests/functional/modules/test_dockermod.py +++ /dev/null @@ -1,92 +0,0 @@ -""" -Integration tests for the docker_container states -""" - -import logging - -import pytest -from saltfactories.utils import random_string -from saltfactories.utils.functional import StateResult - -pytest.importorskip("docker") - -log = logging.getLogger(__name__) - -pytestmark = [ - pytest.mark.slow_test, - pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False), -] - - -@pytest.fixture(scope="module") -def state_tree(state_tree): - top_sls = """ - base: - '*': - - core - """ - core_state = """ - /tmp/foo/testfile: - file: - - managed - - source: salt://testfile - - makedirs: true - """ - testfile = "foo" - - with pytest.helpers.temp_file( - "top.sls", top_sls, state_tree - ), pytest.helpers.temp_file( - "core.sls", core_state, state_tree - ), pytest.helpers.temp_file( - "testfile", testfile, state_tree - ): - yield state_tree - - -@pytest.fixture(scope="module") -def container(salt_factories, state_tree): - - factory = salt_factories.get_container( - random_string("python-3-"), - image_name="ghcr.io/saltstack/salt-ci-containers/python:3", - container_run_kwargs={ - "ports": {"8500/tcp": None}, - "entrypoint": "tail -f /dev/null", - }, - pull_before_start=True, - skip_on_pull_failure=True, - skip_if_docker_client_not_connectable=True, - ) - - with factory.started(): - yield factory - - -@pytest.fixture -def docker(modules, container): - return modules.docker - - -def test_docker_call(docker, container): - """ - check that docker.call works, and works with a container not running as root - """ - ret = docker.call(container.name, "test.ping") - assert ret is True - - -def test_docker_sls(docker, container, state_tree, tmp_path): - """ - check that docker.sls works, and works with a container not running as root - """ - ret = StateResult(docker.apply(container.name, "core")) - assert ret.result is True - - -def test_docker_highstate(docker, container, state_tree, tmp_path): - """ - check that docker.highstate works, and works with a container not running as root - """ - ret = StateResult(docker.apply(container.name)) - assert ret.result is True diff --git a/tests/pytests/functional/modules/test_sdb.py b/tests/pytests/functional/modules/test_sdb.py index 5519bf8ab57..e6b284b708a 100644 --- a/tests/pytests/functional/modules/test_sdb.py +++ b/tests/pytests/functional/modules/test_sdb.py @@ -16,6 +16,7 @@ def minion_config_overrides(): } +@pytest.mark.skip("GREAT MODULE MIGRATION") @pytest.mark.parametrize( "expected_value", ( diff --git a/tests/pytests/functional/states/test_mysql.py b/tests/pytests/functional/states/test_mysql.py deleted file mode 100644 index 1f14d8d8ed2..00000000000 --- a/tests/pytests/functional/states/test_mysql.py +++ /dev/null @@ -1,454 +0,0 @@ -""" -Test Salt MySQL state module across various MySQL variants -""" - -import logging -import time - -import pytest -from pytestshellutils.utils import format_callback_to_string -from saltfactories.utils.functional import StateResult - -import salt.modules.mysql as mysqlmod -from tests.support.pytest.mysql import * # pylint: disable=wildcard-import,unused-wildcard-import - -log = logging.getLogger(__name__) - -pytestmark = [ - pytest.mark.slow_test, - pytest.mark.skip_if_binaries_missing("dockerd"), - pytest.mark.skipif( - mysqlmod.MySQLdb is None, reason="No python mysql client installed." - ), -] - - -def _get_mysql_error(context): - return context.pop("mysql.error", None) - - -class CallWrapper: - def __init__(self, func, container, ctx): - self.func = func - self.container = container - self.ctx = ctx - - def __call__(self, *args, **kwargs): - kwargs.update(self.container.get_credentials(**kwargs)) - retry = 1 - retries = 3 - ret = None - while True: - ret = self.func(*list(args), **kwargs.copy()) - mysql_error = _get_mysql_error(self.ctx) - if mysql_error is None: - break - - retry += 1 - - if retry > retries: - break - - time.sleep(0.5) - log.debug( - "Retrying(%s out of %s) %s because of the following error: %s", - retry, - retries, - format_callback_to_string(self.func, args, kwargs), - mysql_error, - ) - return ret - - -class StateSingleWrapper: - def __init__(self, func, container, ctx): - self.func = func - self.container = container - self.ctx = ctx - - def __call__(self, statefunc, *args, **kwargs): - if statefunc.startswith("mysql_"): - kwargs.update(self.container.get_credentials(**kwargs)) - retry = 1 - retries = 3 - ret = None - while True: - ret = self.func(statefunc, *list(args), **kwargs.copy()) - if ret.result: - break - - mysql_error = _get_mysql_error(self.ctx) - if mysql_error is None: - break - - retry += 1 - if retry > retries: - break - - time.sleep(0.5) - log.debug( - "Retrying(%s out of %s) %s because of the following return: %s", - retry, - retries, - format_callback_to_string(statefunc, args, kwargs), - ret, - ) - else: - # No retries for every other state function - ret = self.func(statefunc, *args, **kwargs) - if isinstance(ret, StateResult): - # Sadly, because we're wrapping, we need to return the raw - # attribute for a StateResult class to be recreated. - return ret.raw - return ret - - -@pytest.fixture(scope="module") -def mysql(modules, mysql_container, loaders): - for name in list(modules): - if name.startswith("mysql."): - modules._dict[name] = CallWrapper( - modules._dict[name], - mysql_container, - loaders.context, - ) - if name == "state.single": - modules._dict[name] = StateSingleWrapper( - modules._dict[name], - mysql_container, - loaders.context, - ) - return modules.mysql - - -@pytest.fixture(scope="module") -def mysql_states(mysql, states, mysql_container): - # Just so we also have the container running - return states - - -@pytest.fixture(scope="module") -def mysql_user(mysql_states): - return mysql_states.mysql_user - - -@pytest.fixture(scope="module") -def mysql_query(mysql_states): - return mysql_states.mysql_query - - -@pytest.fixture(scope="module") -def mysql_grants(mysql_states): - return mysql_states.mysql_grants - - -@pytest.fixture(scope="module") -def mysql_database(mysql_states): - return mysql_states.mysql_database - - -def test_database_present_absent(mysql_database): - ret = mysql_database.present(name="test_database") - assert ret.changes - assert ret.changes == {"test_database": "Present"} - assert ret.comment - assert ret.comment == "The database test_database has been created" - - ret = mysql_database.absent(name="test_database") - assert ret.changes - assert ret.changes == {"test_database": "Absent"} - assert ret.comment - assert ret.comment == "Database test_database has been removed" - - -def test_grants_present_absent(mysql, mysql_grants): - - # Create the database - ret = mysql.db_create("salt") - assert ret - - # Create a user - ret = mysql.user_create( - "george", - host="localhost", - password="badpassword", - ) - assert ret - - try: - - ret = mysql_grants.present( - name="add_salt_grants", - grant="select,insert,update", - database="salt.*", - user="george", - host="localhost", - ) - assert ret.changes - assert ret.changes == {"add_salt_grants": "Present"} - assert ret.comment - assert ( - ret.comment - == "Grant select,insert,update on salt.* to george@localhost has been added" - ) - - ret = mysql_grants.absent( - name="delete_salt_grants", - grant="select,insert,update", - database="salt.*", - user="george", - host="localhost", - ) - assert ret.changes - assert ret.changes == {"delete_salt_grants": "Absent"} - assert ret.comment - assert ( - ret.comment - == "Grant select,insert,update on salt.* for george@localhost has been revoked" - ) - - finally: - # Remove the user - ret = mysql.user_remove("george", host="localhost") - assert ret - - # Remove the database - ret = mysql.db_remove("salt") - assert ret - - -def test_grants_present_absent_all_privileges(mysql, mysql_grants): - - # Create the database - ret = mysql.db_create("salt_2_0") - assert ret - - # Create a user - ret = mysql.user_create( - "george", - host="localhost", - password="badpassword", - ) - assert ret - - try: - ret = mysql_grants.present( - name="add_salt_grants", - grant="all privileges", - database="salt_2_0.*", - user="george", - host="localhost", - ) - - assert ret.changes - assert ret.changes == {"add_salt_grants": "Present"} - - assert ret.comment - assert ( - ret.comment - == "Grant all privileges on salt_2_0.* to george@localhost has been added" - ) - - ret = mysql_grants.absent( - name="delete_salt_grants", - grant="all privileges", - database="salt_2_0.*", - user="george", - host="localhost", - ) - - assert ret.changes - assert ret.changes == {"delete_salt_grants": "Absent"} - - assert ret.comment - assert ( - ret.comment - == "Grant all privileges on salt_2_0.* for george@localhost has been revoked" - ) - - finally: - # Remove the user - ret = mysql.user_remove("george", host="localhost") - assert ret - - # Remove the database - ret = mysql.db_remove("salt_2_0") - assert ret - - -def test_user_present_absent(mysql_user): - - ret = mysql_user.present( - name="george", - host="localhost", - password="password", - ) - assert ret.changes - assert ret.changes == {"george": "Present"} - assert ret.comment - assert ret.comment == "The user george@localhost has been added" - - ret = mysql_user.absent( - name="george", - host="localhost", - ) - assert ret.changes - assert ret.changes == {"george": "Absent"} - assert ret.comment - assert ret.comment == "User george@localhost has been removed" - - -def test_user_present_absent_passwordless(mysql_user): - - ret = mysql_user.present( - name="george", - host="localhost", - allow_passwordless=True, - ) - assert ret.changes - assert ret.changes == {"george": "Present"} - assert ret.comment - assert ( - ret.comment - == "The user george@localhost has been added with passwordless login" - ) - - ret = mysql_user.absent( - name="george", - host="localhost", - ) - assert ret.changes - assert ret.changes == {"george": "Absent"} - assert ret.comment - assert ret.comment == "User george@localhost has been removed" - - -def test_user_present_absent_unixsocket(mysql, mysql_user, mysql_container): - - # The auth_socket plugin on MariaDB is unavailable - # on versions 10.1 - 10.3 - if "mariadb" in mysql_container.mysql_name: - if mysql_container.mysql_version in ("10.1", "10.2", "10.3"): - pytest.skip( - "The auth_socket plugin is unavaiable " - "for the {}:{} docker image.".format( - mysql_container.mysql_name, mysql_container.mysql_version - ) - ) - - # enable the auth_socket plugin on MySQL - # already enabled on MariaDB > 10.3 - try: - if "mariadb" not in mysql_container.mysql_name: - ret = mysql.plugin_add("auth_socket") - assert ret - - ret = mysql_user.present( - name="george", - host="localhost", - unix_socket=True, - allow_passwordless=False, - ) - assert ret.changes - assert ret.changes == {"george": "Present"} - assert ret.comment - assert ( - ret.comment == "The user george@localhost has been added using unix_socket" - ) - - ret = mysql_user.absent( - name="george", - host="localhost", - ) - assert ret.changes - assert ret.changes == {"george": "Absent"} - assert ret.comment - assert ret.comment == "User george@localhost has been removed" - finally: - if "mariadb" not in mysql_container.mysql_name: - ret = mysql.plugin_remove("auth_socket") - assert ret - - -def test_grants_present_absent_state_file( - modules, mysql, mysql_grants, mysql_combo, state_tree -): - - content = """ - sbclient_2_0: - mysql_user.present: - - host: localhost - - password: sbclient - - connection_user: {mysql_user} - - connection_pass: {mysql_pass} - - connection_db: mysql - - connection_port: {mysql_port} - mysql_database.present: - - connection_user: {mysql_user} - - connection_pass: {mysql_pass} - - connection_db: mysql - - connection_port: {mysql_port} - mysql_grants.present: - - grant: ALL PRIVILEGES - - user: sbclient_2_0 - - database: sbclient_2_0.* - - host: localhost - - connection_user: {mysql_user} - - connection_pass: {mysql_pass} - - connection_db: mysql - - connection_port: {mysql_port} - """.format( - mysql_user=mysql_combo.mysql_root_user, - mysql_pass=mysql_combo.mysql_root_passwd, - mysql_port=mysql_combo.mysql_port, - ) - - try: - with pytest.helpers.temp_file("manage_mysql.sls", content, state_tree): - ret = modules.state.apply("manage_mysql") - - # Check user creation - state = "mysql_user_|-sbclient_2_0_|-sbclient_2_0_|-present" - assert state in ret - assert "changes" in ret[state] - assert ret[state].changes == {"sbclient_2_0": "Present"} - - # Check database creation - state = "mysql_database_|-sbclient_2_0_|-sbclient_2_0_|-present" - assert state in ret - assert "changes" in ret[state] - assert ret[state].changes == {"sbclient_2_0": "Present"} - - # Check grant creation - state = "mysql_grants_|-sbclient_2_0_|-sbclient_2_0_|-present" - assert state in ret - assert "comment" in ret[state] - assert ( - ret[state].comment - == "Grant ALL PRIVILEGES on sbclient_2_0.* to sbclient_2_0@localhost has been added" - ) - - ret = mysql_grants.absent( - name="delete_sbclient_grants", - grant="all privileges", - database="sbclient_2_0.*", - user="sbclient_2_0", - host="localhost", - ) - assert ret.changes - assert ret.changes == {"delete_sbclient_grants": "Absent"} - - assert ret.comment - assert ( - ret.comment - == "Grant all privileges on sbclient_2_0.* for sbclient_2_0@localhost has been revoked" - ) - - finally: - # Remove the user - ret = mysql.user_remove("sbclient_2_0", host="localhost") - assert ret - - # Remove the database - ret = mysql.db_remove("sbclient_2_0") - assert ret diff --git a/tests/pytests/integration/client/test_runner.py b/tests/pytests/integration/client/test_runner.py index 74a25cb1353..08848be3372 100644 --- a/tests/pytests/integration/client/test_runner.py +++ b/tests/pytests/integration/client/test_runner.py @@ -159,5 +159,4 @@ def test_get_docs(client): assert "cache.clear_pillar" in ret assert "cache.grains" in ret assert "state.soft_kill" in ret - assert "virt.start" in ret assert "test.arg" in ret diff --git a/tests/pytests/integration/ssh/test_config.py b/tests/pytests/integration/ssh/test_config.py index 7f38ec5a0a8..3d315c410fd 100644 --- a/tests/pytests/integration/ssh/test_config.py +++ b/tests/pytests/integration/ssh/test_config.py @@ -24,7 +24,8 @@ def test_option_minion_opt(salt_ssh_cli, omit): assert (ret.data == "") is omit -@pytest.mark.parametrize("omit", (False, True)) +# omit False not checked because cmd_yaml removed as a part of the great module migration. +@pytest.mark.parametrize("omit", (True,)) def test_option_pillar(salt_ssh_cli, omit): ret = salt_ssh_cli.run("config.option", "ext_spam", omit_pillar=omit) assert ret.returncode == 0 @@ -50,7 +51,8 @@ def test_get_minion_opt(salt_ssh_cli, omit): assert ("minion" not in ret.data) is omit -@pytest.mark.parametrize("omit", (False, True)) +# omit False not checked because cmd_yaml removed as a part of the great module migration. +@pytest.mark.parametrize("omit", (True,)) def test_get_pillar(salt_ssh_cli, omit): ret = salt_ssh_cli.run("config.get", "ext_spam", omit_pillar=omit) assert ret.returncode == 0 diff --git a/tests/pytests/pkg/integration/test_pip.py b/tests/pytests/pkg/integration/test_pip.py index 8eb247e7293..12d34bbffea 100644 --- a/tests/pytests/pkg/integration/test_pip.py +++ b/tests/pytests/pkg/integration/test_pip.py @@ -50,7 +50,7 @@ def pkg_tests_account_environ(pkg_tests_account): return environ -@pytest.skip("Great module migration") +@pytest.mark.skip("Great module migration") def test_pip_install(salt_call_cli, install_salt, shell): """ Test pip.install and ensure module can use installed library diff --git a/tests/pytests/scenarios/compat/test_with_versions.py b/tests/pytests/scenarios/compat/test_with_versions.py index cc61a01f509..d9ba733839f 100644 --- a/tests/pytests/scenarios/compat/test_with_versions.py +++ b/tests/pytests/scenarios/compat/test_with_versions.py @@ -21,6 +21,7 @@ log = logging.getLogger(__name__) pytestmark = [ + pytest.mark.skip("GREAT MODULE MIGRATION"), pytest.mark.slow_test, pytest.mark.skip_if_binaries_missing("docker"), pytest.mark.skipif( diff --git a/tests/pytests/scenarios/performance/test_performance.py b/tests/pytests/scenarios/performance/test_performance.py index e9e0d0def65..5c22b3fa2ee 100644 --- a/tests/pytests/scenarios/performance/test_performance.py +++ b/tests/pytests/scenarios/performance/test_performance.py @@ -365,6 +365,7 @@ def perf_state_name(state_tree, curr_master, prev_master): return subdir +@pytest.mark.skip("GREAT MODULE MIGRATION") def test_performance( prev_salt_cli, prev_minion, diff --git a/tests/pytests/unit/cloud/test_map.py b/tests/pytests/unit/cloud/test_map.py index 400c77398bc..419c262819d 100644 --- a/tests/pytests/unit/cloud/test_map.py +++ b/tests/pytests/unit/cloud/test_map.py @@ -100,6 +100,7 @@ def salt_cloud_config_file(salt_master_factory): # The cloud map merge uses python's multiprocessing manager which authenticates using HMAC and MD5 +@pytest.mark.skip("GREAT MODULE MIGRATION") @pytest.mark.skip_on_fips_enabled_platform def test_cloud_map_merge_conf(salt_cloud_config_file): """ diff --git a/tests/pytests/unit/modules/test_baredoc.py b/tests/pytests/unit/modules/test_baredoc.py index de2ec43ca42..cc473caef9d 100644 --- a/tests/pytests/unit/modules/test_baredoc.py +++ b/tests/pytests/unit/modules/test_baredoc.py @@ -19,7 +19,7 @@ def test_baredoc_list_states(): Test baredoc state module listing """ ret = baredoc.list_states(names_only=True) - assert "value_present" in ret["xml"][0] + assert "run" in ret["cmd"] def test_baredoc_list_states_args(): @@ -27,17 +27,17 @@ def test_baredoc_list_states_args(): Test baredoc state listing with args """ ret = baredoc.list_states() - assert "value_present" in ret["xml"][0] - assert "xpath" in ret["xml"][0]["value_present"] + assert "wait" in ret["cmd"][0] + assert "runas" in ret["cmd"][0]["wait"] def test_baredoc_list_states_single(): """ Test baredoc state listing single state module """ - ret = baredoc.list_states("xml") - assert "value_present" in ret["xml"][0] - assert "xpath" in ret["xml"][0]["value_present"] + ret = baredoc.list_states("cmd") + assert "wait" in ret["cmd"][0] + assert "runas" in ret["cmd"][0]["wait"] def test_baredoc_list_modules(): @@ -45,7 +45,7 @@ def test_baredoc_list_modules(): test baredoc executiion module listing """ ret = baredoc.list_modules(names_only=True) - assert "get_value" in ret["xml"][0] + assert "run" in ret["cmd"] def test_baredoc_list_modules_args(): @@ -61,29 +61,27 @@ def test_baredoc_list_modules_single_and_alias(): """ test baredoc single module listing """ - ret = baredoc.list_modules("mdata") - assert "put" in ret["mdata"][2] - assert "keyname" in ret["mdata"][2]["put"] + ret = baredoc.list_modules("cmdmod") + assert "run_stdout" in ret["cmd"][2] def test_baredoc_state_docs(): ret = baredoc.state_docs() - assert "XML Manager" in ret["xml"] - assert "zabbix_usergroup" in ret + assert "Execution of arbitrary commands" in ret["cmd"] + assert "acl.absent" in ret def test_baredoc_state_docs_single_arg(): - ret = baredoc.state_docs("xml") - assert "XML Manager" in ret["xml"] - ret = baredoc.state_docs("xml.value_present") - assert "Manages a given XML file" in ret["xml.value_present"] + ret = baredoc.state_docs("cmd") + assert "Execution of arbitrary commands" in ret["cmd"] + ret = baredoc.state_docs("timezone.system") + assert "Set the timezone for the system." in ret["timezone.system"] def test_baredoc_state_docs_multiple_args(): - ret = baredoc.state_docs("zabbix_hostgroup.present", "xml") - assert "Ensures that the host group exists" in ret["zabbix_hostgroup.present"] - assert "XML Manager" in ret["xml"] - assert "Manages a given XML file" in ret["xml.value_present"] + ret = baredoc.state_docs("timezone.system", "cmd") + assert "Set the timezone for the system." in ret["timezone.system"] + assert "Execution of arbitrary commands" in ret["cmd"] def test_baredoc_module_docs(): diff --git a/tests/pytests/unit/modules/test_pip.py b/tests/pytests/unit/modules/test_pip.py index 0684c3fdd05..b2b5a8988d0 100644 --- a/tests/pytests/unit/modules/test_pip.py +++ b/tests/pytests/unit/modules/test_pip.py @@ -474,10 +474,10 @@ def test_install_venv(): ) -def test_install_log_argument_in_resulting_command(python_binary): +def test_install_log_argument_in_resulting_command(python_binary, tmp_path): with patch("os.access") as mock_path: pkg = "pep8" - log_path = "/tmp/pip-install.log" + log_path = str(tmp_path / "pip-install.log") mock = MagicMock(return_value={"retcode": 0, "stdout": ""}) with patch.dict(pip.__salt__, {"cmd.run_all": mock}): pip.install(pkg, log=log_path) diff --git a/tests/pytests/unit/modules/test_slsutil.py b/tests/pytests/unit/modules/test_slsutil.py index 46eb221552a..d02c9eaae71 100644 --- a/tests/pytests/unit/modules/test_slsutil.py +++ b/tests/pytests/unit/modules/test_slsutil.py @@ -218,11 +218,11 @@ def test_renderer(): with pytest.raises(salt.exceptions.SaltInvocationError) as exc: slsutil.renderer() - assert str(exc.value) == "Must pass path or string." + assert str(exc.value) == "Must pass path or string." with pytest.raises(salt.exceptions.SaltInvocationError) as exc: slsutil.renderer(path="/path/to/file", string="Hello world") - assert str(exc.value) == "Must not pass both path and string." + assert str(exc.value) == "Must not pass both path and string." with patch.dict( slsutil.__salt__, {"cp.get_url": MagicMock(return_value="/path/to/file")} diff --git a/tests/pytests/unit/returners/test_highstate_return.py b/tests/pytests/unit/returners/test_highstate_return.py index cd2fbc4d681..d7001da36ac 100644 --- a/tests/pytests/unit/returners/test_highstate_return.py +++ b/tests/pytests/unit/returners/test_highstate_return.py @@ -9,7 +9,6 @@ import pytest import salt.returners.highstate_return as highstate import salt.utils.files -from tests.support.mock import MagicMock, patch @pytest.fixture @@ -125,35 +124,3 @@ def test_pipe_in_name(output_file, ret): highstate.returner(ret) with salt.utils.files.fopen(str(output_file)) as fh_: assert json.load(fh_) == expected - - -def test_smtp_options(ret): - """ - Test to see if the highstate returner uses smtp options - """ - smtp_username = "alice" - smtp_password = "p4ssw0rd" - smtp_server = "salt.stack.test" - smtp_port = 587 - smtp_tls = True - - options = { - "smtp_username": smtp_username, - "smtp_password": smtp_password, - "smtp_server": smtp_server, - "smtp_port": smtp_port, - "smtp_tls": smtp_tls, - "smtp_recipients": "bob.salt.test", - "smtp_sender": "alice.salt.test", - "report_delivery": "smtp", - } - - with patch( - "salt.returners.highstate_return._get_options", MagicMock(return_value=options) - ), patch("salt.returners.smtp_return.smtplib.SMTP") as mocked_smtplib: - highstate.returner(ret) - mocked_smtplib.assert_called_with(host=smtp_server, port=smtp_port) - mocked_smtplib.return_value.login.assert_called_with( - smtp_username, smtp_password - ) - assert mocked_smtplib.return_value.starttls.called is smtp_tls diff --git a/tests/pytests/unit/states/file/test_serialize.py b/tests/pytests/unit/states/file/test_serialize.py index 5f9f34d35f4..a1019271a33 100644 --- a/tests/pytests/unit/states/file/test_serialize.py +++ b/tests/pytests/unit/states/file/test_serialize.py @@ -2,8 +2,6 @@ import pytest import salt.serializers.json as jsonserializer import salt.serializers.msgpack as msgpackserializer -import salt.serializers.plist as plistserializer -import salt.serializers.python as pythonserializer import salt.serializers.yaml as yamlserializer import salt.states.file as filestate from tests.support.mock import MagicMock, patch @@ -18,9 +16,7 @@ def configure_loader_modules(): "__serializers__": { "yaml.serialize": yamlserializer.serialize, "yaml.seserialize": yamlserializer.serialize, - "python.serialize": pythonserializer.serialize, "json.serialize": jsonserializer.serialize, - "plist.serialize": plistserializer.serialize, "msgpack.serialize": msgpackserializer.serialize, }, "__opts__": {"test": False, "cachedir": ""}, diff --git a/tests/unit/utils/test_pydsl.py b/tests/unit/utils/test_pydsl.py deleted file mode 100644 index 4c8e373c1f5..00000000000 --- a/tests/unit/utils/test_pydsl.py +++ /dev/null @@ -1,516 +0,0 @@ -import copy -import io -import os -import shutil -import sys -import tempfile -import textwrap - -import pytest - -import salt.config -import salt.loader -import salt.utils.files -from salt.state import HighState -from salt.utils.pydsl import PyDslError -from tests.support.helpers import with_tempdir -from tests.support.runtests import RUNTIME_VARS -from tests.support.unit import TestCase - -REQUISITES = ["require", "require_in", "use", "use_in", "watch", "watch_in"] - - -class CommonTestCaseBoilerplate(TestCase): - def setUp(self): - self.root_dir = tempfile.mkdtemp(dir=RUNTIME_VARS.TMP) - self.addCleanup(shutil.rmtree, self.root_dir, ignore_errors=True) - self.state_tree_dir = os.path.join(self.root_dir, "state_tree") - self.cache_dir = os.path.join(self.root_dir, "cachedir") - if not os.path.isdir(self.root_dir): - os.makedirs(self.root_dir) - - if not os.path.isdir(self.state_tree_dir): - os.makedirs(self.state_tree_dir) - - if not os.path.isdir(self.cache_dir): - os.makedirs(self.cache_dir) - self.config = salt.config.minion_config(None) - self.config["root_dir"] = self.root_dir - self.config["state_events"] = False - self.config["id"] = "match" - self.config["file_client"] = "local" - self.config["file_roots"] = dict(base=[self.state_tree_dir]) - self.config["cachedir"] = self.cache_dir - self.config["test"] = False - self.config["grains"] = salt.loader.grains(self.config) - self.HIGHSTATE = HighState(self.config) - self.HIGHSTATE.push_active() - - def tearDown(self): - try: - self.HIGHSTATE.pop_active() - except IndexError: - pass - del self.config - del self.HIGHSTATE - - def state_highstate(self, state, dirpath): - opts = copy.copy(self.config) - opts["file_roots"] = dict(base=[dirpath]) - HIGHSTATE = HighState(opts) - HIGHSTATE.push_active() - try: - high, errors = HIGHSTATE.render_highstate(state) - if errors: - import pprint - - pprint.pprint("\n".join(errors)) - pprint.pprint(high) - - out = HIGHSTATE.state.call_high(high) - # pprint.pprint(out) - finally: - HIGHSTATE.pop_active() - - -class PyDSLRendererTestCase(CommonTestCaseBoilerplate): - """ - WARNING: If tests in here are flaky, they may need - to be moved to their own class. Sharing HighState, especially - through setUp/tearDown can create dangerous race conditions! - """ - - def render_sls(self, content, sls="", saltenv="base", **kws): - if "env" in kws: - # "env" is not supported; Use "saltenv". - kws.pop("env") - - return self.HIGHSTATE.state.rend["pydsl"]( - io.StringIO(content), saltenv=saltenv, sls=sls, **kws - ) - - @pytest.mark.slow_test - def test_state_declarations(self): - result = self.render_sls( - textwrap.dedent( - """ - state('A').cmd.run('ls -la', cwd='/var/tmp') - state().file.managed('myfile.txt', source='salt://path/to/file') - state('X').cmd('run', 'echo hello world', cwd='/') - - a_cmd = state('A').cmd - a_cmd.run(shell='/bin/bash') - state('A').service.running(name='apache') - """ - ) - ) - self.assertTrue("A" in result and "X" in result) - A_cmd = result["A"]["cmd"] - self.assertEqual(A_cmd[0], "run") - self.assertEqual(A_cmd[1]["name"], "ls -la") - self.assertEqual(A_cmd[2]["cwd"], "/var/tmp") - self.assertEqual(A_cmd[3]["shell"], "/bin/bash") - - A_service = result["A"]["service"] - self.assertEqual(A_service[0], "running") - self.assertEqual(A_service[1]["name"], "apache") - - X_cmd = result["X"]["cmd"] - self.assertEqual(X_cmd[0], "run") - self.assertEqual(X_cmd[1]["name"], "echo hello world") - self.assertEqual(X_cmd[2]["cwd"], "/") - - del result["A"] - del result["X"] - self.assertEqual(len(result), 2) - # 2 rather than 1 because pydsl adds an extra no-op state - # declaration. - - s_iter = iter(result.values()) - try: - s = next(s_iter)["file"] - except KeyError: - s = next(s_iter)["file"] - self.assertEqual(s[0], "managed") - self.assertEqual(s[1]["name"], "myfile.txt") - self.assertEqual(s[2]["source"], "salt://path/to/file") - - @pytest.mark.slow_test - def test_requisite_declarations(self): - result = self.render_sls( - textwrap.dedent( - """ - state('X').cmd.run('echo hello') - state('A').cmd.run('mkdir tmp', cwd='/var') - state('B').cmd.run('ls -la', cwd='/var/tmp') \ - .require(state('X').cmd) \ - .require(cmd='A') \ - .watch(service='G') - state('G').service.running(name='collectd') - state('G').service.watch_in(state('A').cmd) - - state('H').cmd.require_in(cmd='echo hello') - state('H').cmd.run('echo world') - """ - ) - ) - self.assertEqual(len(result), 6) - self.assertTrue(set("X A B G H".split()).issubset(set(result.keys()))) - b = result["B"]["cmd"] - self.assertEqual(b[0], "run") - self.assertEqual(b[1]["name"], "ls -la") - self.assertEqual(b[2]["cwd"], "/var/tmp") - self.assertEqual(b[3]["require"][0]["cmd"], "X") - self.assertEqual(b[4]["require"][0]["cmd"], "A") - self.assertEqual(b[5]["watch"][0]["service"], "G") - self.assertEqual(result["G"]["service"][2]["watch_in"][0]["cmd"], "A") - self.assertEqual(result["H"]["cmd"][1]["require_in"][0]["cmd"], "echo hello") - - @pytest.mark.slow_test - def test_include_extend(self): - result = self.render_sls( - textwrap.dedent( - """ - include( - 'some.sls.file', - 'another.sls.file', - 'more.sls.file', - delayed=True - ) - A = state('A').cmd.run('echo hoho', cwd='/') - state('B').cmd.run('echo hehe', cwd='/') - extend( - A, - state('X').cmd.run(cwd='/a/b/c'), - state('Y').file('managed', name='a_file.txt'), - state('Z').service.watch(file='A') - ) - """ - ) - ) - self.assertEqual(len(result), 4) - self.assertEqual( - result["include"], - [ - {"base": sls} - for sls in ("some.sls.file", "another.sls.file", "more.sls.file") - ], - ) - extend = result["extend"] - self.assertEqual(extend["X"]["cmd"][0], "run") - self.assertEqual(extend["X"]["cmd"][1]["cwd"], "/a/b/c") - self.assertEqual(extend["Y"]["file"][0], "managed") - self.assertEqual(extend["Y"]["file"][1]["name"], "a_file.txt") - self.assertEqual(len(extend["Z"]["service"]), 1) - self.assertEqual(extend["Z"]["service"][0]["watch"][0]["file"], "A") - - self.assertEqual(result["B"]["cmd"][0], "run") - self.assertTrue("A" not in result) - self.assertEqual(extend["A"]["cmd"][0], "run") - - @pytest.mark.slow_test - def test_cmd_call(self): - result = self.HIGHSTATE.state.call_template_str( - textwrap.dedent( - """\ - #!pydsl - state('A').cmd.run('echo this is state A', cwd='/') - - some_var = 12345 - def do_something(a, b, *args, **kws): - return dict(result=True, changes={'a': a, 'b': b, 'args': args, 'kws': kws, 'some_var': some_var}) - - state('C').cmd.call(do_something, 1, 2, 3, x=1, y=2) \ - .require(state('A').cmd) - - state('G').cmd.wait('echo this is state G', cwd='/') \ - .watch(state('C').cmd) - """ - ) - ) - ret = next(result[k] for k in result.keys() if "do_something" in k) - changes = ret["changes"] - self.assertEqual( - changes, dict(a=1, b=2, args=(3,), kws=dict(x=1, y=2), some_var=12345) - ) - - ret = next(result[k] for k in result.keys() if "-G_" in k) - self.assertEqual(ret["changes"]["stdout"], "this is state G") - - @pytest.mark.slow_test - def test_multiple_state_func_in_state_mod(self): - with self.assertRaisesRegex(PyDslError, "Multiple state functions"): - self.render_sls( - textwrap.dedent( - """ - state('A').cmd.run('echo hoho') - state('A').cmd.wait('echo hehe') - """ - ) - ) - - @pytest.mark.slow_test - def test_no_state_func_in_state_mod(self): - with self.assertRaisesRegex(PyDslError, "No state function specified"): - self.render_sls( - textwrap.dedent( - """ - state('B').cmd.require(cmd='hoho') - """ - ) - ) - - @pytest.mark.slow_test - def test_load_highstate(self): - result = self.render_sls( - textwrap.dedent( - ''' - import salt.utils.yaml - __pydsl__.load_highstate(salt.utils.yaml.safe_load(""" - A: - cmd.run: - - name: echo hello - - cwd: / - B: - pkg: - - installed - service: - - running - - require: - - pkg: B - - watch: - - cmd: A - """)) - - state('A').cmd.run(name='echo hello world') - ''' - ) - ) - self.assertEqual(len(result), 3) - self.assertEqual(result["A"]["cmd"][0], "run") - self.assertIn({"name": "echo hello"}, result["A"]["cmd"]) - self.assertIn({"cwd": "/"}, result["A"]["cmd"]) - self.assertIn({"name": "echo hello world"}, result["A"]["cmd"]) - self.assertEqual(len(result["A"]["cmd"]), 4) - - self.assertEqual(len(result["B"]["pkg"]), 1) - self.assertEqual(result["B"]["pkg"][0], "installed") - - self.assertEqual(result["B"]["service"][0], "running") - self.assertIn({"require": [{"pkg": "B"}]}, result["B"]["service"]) - self.assertIn({"watch": [{"cmd": "A"}]}, result["B"]["service"]) - self.assertEqual(len(result["B"]["service"]), 3) - - @pytest.mark.slow_test - def test_ordered_states(self): - result = self.render_sls( - textwrap.dedent( - """ - __pydsl__.set(ordered=True) - A = state('A') - state('B').cmd.run('echo bbbb') - A.cmd.run('echo aaa') - state('B').cmd.run(cwd='/') - state('C').cmd.run('echo ccc') - state('B').file.managed(source='/a/b/c') - """ - ) - ) - self.assertEqual(len(result["B"]["cmd"]), 3) - self.assertEqual(result["A"]["cmd"][1]["require"][0]["cmd"], "B") - self.assertEqual(result["C"]["cmd"][1]["require"][0]["cmd"], "A") - self.assertEqual(result["B"]["file"][1]["require"][0]["cmd"], "C") - - @with_tempdir() - @pytest.mark.slow_test - def test_pipe_through_stateconf(self, dirpath): - output = os.path.join(dirpath, "output") - write_to( - os.path.join(dirpath, "xxx.sls"), - textwrap.dedent( - """#!stateconf -os yaml . jinja - .X: - cmd.run: - - name: echo X >> {0} - - cwd: / - .Y: - cmd.run: - - name: echo Y >> {0} - - cwd: / - .Z: - cmd.run: - - name: echo Z >> {0} - - cwd: / - """.format( - output.replace("\\", "/") - ) - ), - ) - write_to( - os.path.join(dirpath, "yyy.sls"), - textwrap.dedent( - """\ - #!pydsl|stateconf -ps - - __pydsl__.set(ordered=True) - state('.D').cmd.run('echo D >> {0}', cwd='/') - state('.E').cmd.run('echo E >> {0}', cwd='/') - state('.F').cmd.run('echo F >> {0}', cwd='/') - """.format( - output.replace("\\", "/") - ) - ), - ) - - write_to( - os.path.join(dirpath, "aaa.sls"), - textwrap.dedent( - """\ - #!pydsl|stateconf -ps - - include('xxx', 'yyy') - - # make all states in xxx run BEFORE states in this sls. - extend(state('.start').stateconf.require(stateconf='xxx::goal')) - - # make all states in yyy run AFTER this sls. - extend(state('.goal').stateconf.require_in(stateconf='yyy::start')) - - __pydsl__.set(ordered=True) - - state('.A').cmd.run('echo A >> {0}', cwd='/') - state('.B').cmd.run('echo B >> {0}', cwd='/') - state('.C').cmd.run('echo C >> {0}', cwd='/') - """.format( - output.replace("\\", "/") - ) - ), - ) - - self.state_highstate({"base": ["aaa"]}, dirpath) - with salt.utils.files.fopen(output, "r") as f: - self.assertEqual("".join(f.read().split()), "XYZABCDEF") - - @with_tempdir() - @pytest.mark.slow_test - def test_compile_time_state_execution(self, dirpath): - if not sys.stdin.isatty(): - self.skipTest("Not attached to a TTY") - # The Windows shell will include any spaces before the redirect - # in the text that is redirected. - # For example: echo hello > test.txt will contain "hello " - write_to( - os.path.join(dirpath, "aaa.sls"), - textwrap.dedent( - """\ - #!pydsl - - __pydsl__.set(ordered=True) - A = state('A') - A.cmd.run('echo hehe>{0}/zzz.txt', cwd='/') - A.file.managed('{0}/yyy.txt', source='salt://zzz.txt') - A() - A() - - state().cmd.run('echo hoho>>{0}/yyy.txt', cwd='/') - - A.file.managed('{0}/xxx.txt', source='salt://zzz.txt') - A() - """.format( - dirpath.replace("\\", "/") - ) - ), - ) - self.state_highstate({"base": ["aaa"]}, dirpath) - with salt.utils.files.fopen(os.path.join(dirpath, "yyy.txt"), "rt") as f: - self.assertEqual(f.read(), "hehe" + os.linesep + "hoho" + os.linesep) - with salt.utils.files.fopen(os.path.join(dirpath, "xxx.txt"), "rt") as f: - self.assertEqual(f.read(), "hehe" + os.linesep) - - @with_tempdir() - @pytest.mark.slow_test - def test_nested_high_state_execution(self, dirpath): - output = os.path.join(dirpath, "output") - write_to( - os.path.join(dirpath, "aaa.sls"), - textwrap.dedent( - """\ - #!pydsl - __salt__['state.sls']('bbb') - state().cmd.run('echo bbbbbb', cwd='/') - """ - ), - ) - write_to( - os.path.join(dirpath, "bbb.sls"), - textwrap.dedent( - """ - # {{ salt['state.sls']('ccc') }} - test: - cmd.run: - - name: echo bbbbbbb - - cwd: / - """ - ), - ) - write_to( - os.path.join(dirpath, "ccc.sls"), - textwrap.dedent( - """ - #!pydsl - state().cmd.run('echo ccccc', cwd='/') - """ - ), - ) - self.state_highstate({"base": ["aaa"]}, dirpath) - - @with_tempdir() - @pytest.mark.slow_test - def test_repeat_includes(self, dirpath): - output = os.path.join(dirpath, "output") - write_to( - os.path.join(dirpath, "b.sls"), - textwrap.dedent( - """\ - #!pydsl - include('c') - include('d') - """ - ), - ) - write_to( - os.path.join(dirpath, "c.sls"), - textwrap.dedent( - """\ - #!pydsl - modtest = include('e') - modtest.success - """ - ), - ) - write_to( - os.path.join(dirpath, "d.sls"), - textwrap.dedent( - """\ - #!pydsl - modtest = include('e') - modtest.success - """ - ), - ) - write_to( - os.path.join(dirpath, "e.sls"), - textwrap.dedent( - """\ - #!pydsl - success = True - """ - ), - ) - self.state_highstate({"base": ["b"]}, dirpath) - self.state_highstate({"base": ["c", "d"]}, dirpath) - - -def write_to(fpath, content): - with salt.utils.files.fopen(fpath, "w") as f: - f.write(content) diff --git a/tests/unit/utils/test_pyobjects.py b/tests/unit/utils/test_pyobjects.py index 981a3351cde..bfaf0c451ef 100644 --- a/tests/unit/utils/test_pyobjects.py +++ b/tests/unit/utils/test_pyobjects.py @@ -395,6 +395,10 @@ class RendererTests(RendererMixin, StateTests, MapBuilder): ) @pytest.mark.slow_test + @pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", + ) def test_sls_imports(self): def render_and_assert(template): ret = self.render( @@ -504,6 +508,10 @@ class RendererTests(RendererMixin, StateTests, MapBuilder): ret = self.render(random_password_import_template) @pytest.mark.slow_test + @pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", + ) def test_requisite_implicit_list(self): """Ensure that the implicit list characteristic works as expected""" requisite_implicit_list_template = textwrap.dedent( @@ -592,6 +600,10 @@ class MapTests(RendererMixin, TestCase, MapBuilder): raise AssertionError("both dicts are equal") @pytest.mark.slow_test + @pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", + ) def test_map(self): """ Test declarative ordering @@ -636,6 +648,10 @@ class MapTests(RendererMixin, TestCase, MapBuilder): self.assert_not_equal(ret, *self.ubuntu_attrs) @pytest.mark.slow_test + @pytest.mark.skipif( + 'grains["os_family"] == "Suse"', + reason="Zypperpkg module removed as a part of great module migration", + ) def test_map_with_priority(self): """ With declarative ordering, the debian service name would override the