Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider: Packet - add ip and volume #7770

Closed
wants to merge 6 commits into from

Conversation

ayudemura
Copy link
Contributor

We have updated our packngo, and plugged in ip service and volume service.

@@ -21,6 +21,7 @@ func Provider() terraform.ResourceProvider {
"packet_device": resourcePacketDevice(),
"packet_ssh_key": resourcePacketSSHKey(),
"packet_project": resourcePacketProject(),
"packet_volume": resourcePacketVolume(),
Copy link
Contributor

@stack72 stack72 Jul 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also include packet_ip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, thanks 😸

@stack72
Copy link
Contributor

stack72 commented Jul 25, 2016

Hi @ayudemura

thanks for the PR here. Unfortunately, when I run some of the tests, I get failures:

=== RUN   TestAccPacketIPAddress_Basic
--- FAIL: TestAccPacketIPAddress_Basic (0.00s)
    testing.go:264: Step 0 error: Configuration is invalid.

        Warnings: []string(nil)

        Errors: []string{"packet_ip_address.foobar: \"address\": this field cannot be set"}
=== RUN   TestAccPacketIPReservation_Basic
--- FAIL: TestAccPacketIPReservation_Basic (0.00s)
    testing.go:264: Step 0 error: Configuration is invalid.

        Warnings: []string(nil)

        Errors: []string{"packet_ip_reservation.foobar: \"address\": this field cannot be set"}
=== RUN   TestAccPacketVolume_Basic
--- FAIL: TestAccPacketVolume_Basic (0.00s)
    testing.go:264: Step 0 error: Configuration is invalid.

        Warnings: []string(nil)

        Errors: []string{"packet_volume.foobar: \"name\": this field cannot be set", "packet_volume.foobar: \"facility\": required field is not set", "packet_volume.foobar: \"plan\": required field is not set", "packet_volume.foobar: \"billing_cycle\": required field is not set", "packet_volume.foobar: \"project_id\": required field is not set"}

Please can you have a look at these?

thanks

Paul

@stack72 stack72 added the waiting-response An issue/pull request is waiting for a response from the community label Jul 25, 2016
@ayudemura
Copy link
Contributor Author

ayudemura commented Jul 25, 2016

@stack72
Thank you for your update. When I run tests locally, I got no error... I used make test TEST=./builtin/providers/packet or make test TEST=./terraform command. Can you give me the command you used when you see error?
Thanks!

@stack72
Copy link
Contributor

stack72 commented Jul 25, 2016

Hi @ayudemura

The make test doesn't run the acceptance tests. This command will run the entire suite:

make testacc TEST=./builtin/providers/packet TESTARGS='-run=TestAccPacket'

@ayudemura ayudemura force-pushed the add_ip_and_volume branch 2 times, most recently from a35c7f3 to 9b08353 Compare July 25, 2016 14:17
@stack72
Copy link
Contributor

stack72 commented Jul 26, 2016

Hi @ayudemura

Do you want me to retest this? :) I see you pushed a commit to fix the tests

Thanks

Paul

@ayudemura
Copy link
Contributor Author

@stack72
Yes, that would be great! It "should" pass this time...
Thank you 😸

@stack72
Copy link
Contributor

stack72 commented Jul 26, 2016

Hi @ayudemura

Afraid not :( Still not working

% make testacc TEST=./builtin/providers/packet TESTARGS='-run=TestAccPacket'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/07/26 22:03:26 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/packet -v -run=TestAccPacket -timeout 120m
=== RUN   TestAccPacketIPAddress_Basic
--- FAIL: TestAccPacketIPAddress_Basic (0.62s)
    testing.go:264: Step 0 error: Error applying: 1 error(s) occurred:

        * packet_ip_address.foobar: Not found
=== RUN   TestAccPacketIPReservation_Basic
panic: interface conversion: interface is nil, not string

goroutine 136 [running]:
panic(0x737b20, 0xc820388000)
    /opt/boxen/homebrew/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6
github.com/hashicorp/terraform/builtin/providers/packet.resourcePacketIPReservationCreate(0xc8202758c0, 0x7353c0, 0xc8201a0360, 0x0, 0x0)
    /Users/stacko/Code/go/src/github.com/hashicorp/terraform/builtin/providers/packet/resource_packet_ip_reservation.go:72 +0xd2
github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc82001af00, 0xc8203e1e00, 0xc8204502b0, 0x7353c0, 0xc8201a0360, 0x32f401, 0x0, 0x0)
    /Users/stacko/Code/go/src/github.com/hashicorp/terraform/helper/schema/resource.go:162 +0x29a
github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc82010e990, 0xc8203e0700, 0xc8203e1e00, 0xc8204502b0, 0x1, 0x0, 0x0)
    /Users/stacko/Code/go/src/github.com/hashicorp/terraform/helper/schema/provider.go:176 +0x1ed
github.com/hashicorp/terraform/terraform.(*EvalApply).Eval(0xc8203e0900, 0xd9e1f0, 0xc820256f70, 0x0, 0x0, 0x0, 0x0)

@stack72
Copy link
Contributor

stack72 commented Jul 26, 2016

The panic is due to the fact that the IP reservation test has no type, yet we expect one in the code

@ayudemura
Copy link
Contributor Author

Putting this on hold.

@ayudemura ayudemura closed this Jul 27, 2016
@stack72
Copy link
Contributor

stack72 commented Jul 27, 2016

k nps - let me know when you reopen it

@ghost
Copy link

ghost commented Apr 24, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement provider/packet waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants