diff options
author | Thomas Hipp <thomashipp@gmail.com> | 2017-11-30 10:00:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 10:00:28 +0100 |
commit | 380076c1943ebd10c5e5f54ad4ac751a736c5c1f (patch) | |
tree | 1128ef74185f8d01ff66c81781238b035a1ce3ac | |
parent | 3fe13bb19661adfd488ff20d978fbac407e34835 (diff) | |
parent | 9c5744cf13b917700a7cf02f780b7749907a4e10 (diff) | |
download | terraform-provider-libvirt-380076c1943ebd10c5e5f54ad4ac751a736c5c1f.tar terraform-provider-libvirt-380076c1943ebd10c5e5f54ad4ac751a736c5c1f.tar.gz |
Merge pull request #255 from MalloZup/remove-running
remove running property in net and domain
-rw-r--r-- | libvirt/resource_libvirt_domain.go | 13 | ||||
-rw-r--r-- | libvirt/resource_libvirt_network.go | 14 | ||||
-rw-r--r-- | website/docs/r/domain.html.markdown | 2 |
3 files changed, 0 insertions, 29 deletions
diff --git a/libvirt/resource_libvirt_domain.go b/libvirt/resource_libvirt_domain.go index 92af802a..95a7b7fe 100644 --- a/libvirt/resource_libvirt_domain.go +++ b/libvirt/resource_libvirt_domain.go @@ -79,12 +79,6 @@ func resourceLibvirtDomain() *schema.Resource { Optional: true, ForceNew: true, }, - "running": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: false, - }, "cloudinit": { Type: schema.TypeString, Required: false, @@ -905,13 +899,6 @@ func resourceLibvirtDomainRead(d *schema.ResourceData, meta interface{}) error { // Emulator is the same as the default don't set it in domainDef // or it will show as changed d.Set("emulator", domainDef.Devices.Emulator) - - running, err := domainIsRunning(*domain) - if err != nil { - return err - } - d.Set("running", running) - var disks []map[string]interface{} for _, diskDef := range domainDef.Devices.Disks { // network drives do not have a volume associated diff --git a/libvirt/resource_libvirt_network.go b/libvirt/resource_libvirt_network.go index a108d648..4cf6baee 100644 --- a/libvirt/resource_libvirt_network.go +++ b/libvirt/resource_libvirt_network.go @@ -79,12 +79,6 @@ func resourceLibvirtNetwork() *schema.Resource { Optional: true, Required: false, }, - "running": { - Type: schema.TypeBool, - Optional: true, - Default: true, - ForceNew: false, - }, "dns_forwarder": { Type: schema.TypeList, Optional: true, @@ -157,8 +151,6 @@ func resourceLibvirtNetworkUpdate(d *schema.ResourceData, meta interface{}) erro if err := network.Create(); err != nil { return err } - d.Set("running", true) - d.SetPartial("running") } if d.HasChange("autostart") { @@ -377,12 +369,6 @@ func resourceLibvirtNetworkRead(d *schema.ResourceData, meta interface{}) error d.Set("domain", networkDef.Domain.Name) } - active, err := network.IsActive() - if err != nil { - return err - } - d.Set("running", active) - autostart, err := network.GetAutostart() if err != nil { return fmt.Errorf("Error reading network autostart setting: %s", err) diff --git a/website/docs/r/domain.html.markdown b/website/docs/r/domain.html.markdown index f008501e..01ed1fc3 100644 --- a/website/docs/r/domain.html.markdown +++ b/website/docs/r/domain.html.markdown @@ -31,8 +31,6 @@ The following arguments are supported: will be created. * `memory` - (Optional) The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used. -* `running` - (Optional) Use `false` to turn off the instance. If not specified, - true is assumed and the instance, if stopped, will be started at next apply. * `disk` - (Optional) An array of one or more disks to attach to the domain. The `disk` object structure is documented [below](#handling-disks). * `network_interface` - (Optional) An array of one or more network interfaces to |