Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dmacvicar/terraform-provider-libvirt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.1
Choose a base ref
...
head repository: dmacvicar/terraform-provider-libvirt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.7.2
Choose a head ref

Commits on Dec 29, 2022

  1. fix lint warnings

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    aa46cbe View commit details
  2. gofmt

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    f867d18 View commit details
  3. remove version flag

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    5a411a3 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    ddee6ee View commit details
  5. remove log.Fatal calls

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    9b18358 View commit details
  6. lint cleanups

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    7e8efc4 View commit details
  7. cleanup ioutil

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    72040cd View commit details
  8. ioutil cleanup

    dmacvicar committed Dec 29, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    unstubbable Hendrik Liebau
    Copy the full SHA
    6552876 View commit details

Commits on Jan 1, 2023

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    b9dd9ce View commit details
  2. Copy the full SHA
    c388d28 View commit details
  3. update all dependencies

    dmacvicar committed Jan 1, 2023
    Copy the full SHA
    8187f5a View commit details
  4. remove ineffectual assignment

    the variable was already set to the appropriate value for the network mode.
    dmacvicar committed Jan 1, 2023
    Copy the full SHA
    4a99136 View commit details

Commits on Jan 2, 2023

  1. lint cleanups

    dmacvicar committed Jan 2, 2023
    Copy the full SHA
    01e507d View commit details
  2. Copy the full SHA
    6a406f7 View commit details
  3. Copy the full SHA
    ae14657 View commit details
  4. gomnd lint

    dmacvicar committed Jan 2, 2023
    Copy the full SHA
    30ceb04 View commit details
  5. Copy the full SHA
    12ed410 View commit details
  6. Copy the full SHA
    2ad9764 View commit details
  7. make 'option_value' for dnsmasq optional (#960)

    There are a number of dnsmasq options - like 'no-hosts' that
    do not require a value.
    This change will make sure that an entry:
    
    resource "libvirt_network" "my_net" {
    ...
      dnsmasq_options {
        options {
           option_name = "no-hosts"
           }
      }
    }
    
    will become:
    
    no-hosts
    
    in the corresponding dnsmasq.conf file.
    
    Signed-off-by: Egbert Eich <eich@suse.com>
    
    * Update documentation to reflect change in dnsmasq options handling
    
    Signed-off-by: Egbert Eich <eich@suse.com>
    e4t authored Jan 2, 2023
    Copy the full SHA
    9260f4c View commit details

Commits on Sep 25, 2023

  1. Copy the full SHA
    402171f View commit details
  2. Copy the full SHA
    ebd0a9a View commit details
  3. Copy the full SHA
    6bf72ae View commit details
Showing with 1,166 additions and 1,160 deletions.
  1. +13 −2 .golangci.yaml
  2. +1 −1 .goreleaser.yml
  3. +2 −2 Makefile
  4. +35 −34 go.mod
  5. +109 −0 go.sum
  6. +45 −52 libvirt/cloudinit_def.go
  7. +5 −11 libvirt/config.go
  8. +16 −14 libvirt/coreos_ignition_def.go
  9. +39 −42 libvirt/data_source_libvirt_network.go
  10. +8 −1 libvirt/data_source_libvirt_network_test.go
  11. +2 −1 libvirt/disk_def.go
  12. +18 −25 libvirt/domain.go
  13. +10 −6 libvirt/domain_def.go
  14. +9 −9 libvirt/helper/hashcode/checksum.go
  15. +19 −19 libvirt/helper/mutexkv/mutexkv.go
  16. +18 −17 libvirt/helpers_test.go
  17. +23 −18 libvirt/network.go
  18. +10 −10 libvirt/network_def.go
  19. +15 −15 libvirt/network_dns.go
  20. +2 −2 libvirt/network_routes.go
  21. +33 −80 libvirt/pool.go
  22. +3 −3 libvirt/provider.go
  23. +23 −43 libvirt/resource_libvirt_cloud_init.go
  24. +10 −9 libvirt/resource_libvirt_cloud_init_test.go
  25. +16 −15 libvirt/resource_libvirt_coreos_ignition.go
  26. +1 −1 libvirt/resource_libvirt_coreos_ignition_test.go
  27. +99 −108 libvirt/resource_libvirt_domain.go
  28. +48 −51 libvirt/resource_libvirt_domain_test.go
  29. +80 −97 libvirt/resource_libvirt_network.go
  30. +5 −0 libvirt/resource_libvirt_network_test.go
  31. +72 −51 libvirt/resource_libvirt_pool.go
  32. +25 −35 libvirt/resource_libvirt_pool_test.go
  33. +105 −94 libvirt/resource_libvirt_volume.go
  34. +19 −19 libvirt/resource_libvirt_volume_test.go
  35. +11 −0 libvirt/timeout.go
  36. +6 −8 libvirt/uri/connection_uri.go
  37. +1 −0 libvirt/uri/connection_uri_test.go
  38. +1 −2 libvirt/uri/ssh.go
  39. +3 −4 libvirt/uri/tls.go
  40. +0 −1 libvirt/uri/tls_test.go
  41. +1 −2 libvirt/uri/unix.go
  42. +0 −3 libvirt/util/strconv.go
  43. +20 −7 libvirt/utils.go
  44. +5 −6 libvirt/utils_domain_def.go
  45. +3 −9 libvirt/utils_domain_def_test.go
  46. +5 −17 libvirt/utils_net.go
  47. +3 −4 libvirt/utils_net_test.go
  48. +10 −34 libvirt/utils_volume.go
  49. +58 −0 libvirt/utils_volume_test.go
  50. +13 −14 libvirt/utils_xslt.go
  51. +35 −88 libvirt/volume.go
  52. +5 −5 libvirt/volume_def.go
  53. +24 −19 libvirt/volume_image.go
  54. +5 −5 libvirt/volume_image_test.go
  55. +3 −21 main.go
  56. +0 −20 main_test.go
  57. +7 −0 version/version.go
  58. +1 −1 website/docs/index.html.markdown
  59. +8 −3 website/docs/r/network.markdown
15 changes: 13 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ linters-settings:
excludes:
- G402
- G106
gomnd:
ignored-functions:
- strings.SplitN

linters:
enable-all: false
@@ -24,14 +27,22 @@ linters:
- errorlint
- errcheck
- gomnd
- nolintlint

issues:
new-from-rev: HEAD~
exclude-rules:
- text: "Error return value of `d.Set` is not checked"
linters:
- errcheck
- text: "Magic number: 1024, in <argument> detected"
linters:
- gomnd

- text: "ifElseChain: rewrite if-else to switch statement"
linters:
- gocritic
- text: "should check returned error before deferring file.Close()"
linters:
- staticcheck
- path: '(.+)_test\.go'
linters:
- lll
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ builds:
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
- '-s -w -X version.ProviderVersion={{.Version}} -X version.ProviderRevision={{.Commit}}'
goos:
- freebsd
- windows
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LDFLAGS += -X main.version=$$(git describe --always --abbrev=40 --dirty)
LDFLAGS += -X version.ProviderVersion=$$(git describe --always --abbrev=40 --dirty)

# default args for tests
TEST_ARGS_DEF := -covermode=count -coverprofile=profile.cov
@@ -18,7 +18,7 @@ install:
# - run all the unit tests: make test
# - run some particular test: make test TEST_ARGS="-run TestAccLibvirtDomain_Cpu"
test:
go test -v $(TEST_ARGS_DEF) $(TEST_ARGS) ./libvirt
go test -v $(TEST_ARGS_DEF) $(TEST_ARGS) ./libvirt/...

# acceptance tests
# usage:
69 changes: 35 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
@@ -3,73 +3,74 @@ module github.com/dmacvicar/terraform-provider-libvirt
require (
github.com/community-terraform-providers/terraform-provider-ignition/v2 v2.1.2
github.com/davecgh/go-spew v1.1.1
github.com/digitalocean/go-libvirt v0.0.0-20220616141158-7ed4ed4decd9
github.com/google/uuid v1.1.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0
github.com/digitalocean/go-libvirt v0.0.0-20221205150000-2939327a8519
github.com/google/uuid v1.3.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
github.com/hooklift/iso9660 v1.0.0
github.com/mattn/goveralls v0.0.2
github.com/stretchr/testify v1.7.2
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167
golang.org/x/lint v0.0.0-20200302205851-738671d3881b
libvirt.org/go/libvirtxml v1.8003.0
github.com/mattn/goveralls v0.0.11
github.com/stretchr/testify v1.8.1
golang.org/x/crypto v0.4.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
libvirt.org/go/libvirtxml v1.8009.0
)

require (
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/c4milo/gotoolkit v0.0.0-20170704181456-e37eeabad07e // indirect
github.com/coreos/go-json v0.0.0-20200220154158-5ae607161559 // indirect
github.com/c4milo/gotoolkit v0.0.0-20190525173301-67483a18c17a // indirect
github.com/coreos/go-json v0.0.0-20211020211907-c63f628265de // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.0.0 // indirect
github.com/coreos/ignition/v2 v2.3.0 // indirect
github.com/coreos/vcontext v0.0.0-20200225161404-ee043618d38d // indirect
github.com/coreos/ignition/v2 v2.14.0 // indirect
github.com/coreos/vcontext v0.0.0-20211021162308-f1dbbca7bef4 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-hclog v1.4.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/go-plugin v1.4.8 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.4.0 // indirect
github.com/hashicorp/hcl/v2 v2.13.0 // indirect
github.com/hashicorp/hcl/v2 v2.15.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.17.2 // indirect
github.com/hashicorp/terraform-exec v0.17.3 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.14.2 // indirect
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/vincent-petithory/dataurl v0.0.0-20191104211930-d1553a71de50 // indirect
github.com/vincent-petithory/dataurl v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.1 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/grpc v1.48.0 // indirect
github.com/vmihailenco/tagparser v0.1.2 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/tools v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Loading