From 3e82e8a609f1f88278d457685cccd66f3914277c Mon Sep 17 00:00:00 2001 From: Dario Maiocchi Date: Tue, 28 Nov 2017 09:58:45 +0100 Subject: remove running property in net and domain --- libvirt/resource_libvirt_domain.go | 13 ------------- libvirt/resource_libvirt_network.go | 14 -------------- 2 files changed, 27 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) -- cgit v1.2.3 From 9c5744cf13b917700a7cf02f780b7749907a4e10 Mon Sep 17 00:00:00 2001 From: Dario Maiocchi Date: Tue, 28 Nov 2017 10:36:50 +0100 Subject: remove running from documentation --- website/docs/r/domain.html.markdown | 2 -- 1 file changed, 2 deletions(-) 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 -- cgit v1.2.3