Skip to content

Commit

Permalink
switching to the standalone SDK for terraform (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremmfr authored Nov 27, 2019
1 parent 65a1d1f commit 241fbda
Show file tree
Hide file tree
Showing 58 changed files with 81 additions and 231 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ issues:
- text: "Use of ssh InsecureIgnoreHostKey"
linters:
- gosec
- text: "`jnpr` can be `github.com/hashicorp/terraform/terraform.ResourceProviderCloser`"
- text: "`jnpr` can be `github.com/hashicorp/terraform-plugin-sdk/terraform.ResourceProviderCloser`"
linters:
- interfacer
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module terraform-provider-junos
go 1.13

require (
github.com/hashicorp/terraform v0.12.11
github.com/hashicorp/terraform-plugin-sdk v1.4.0
github.com/jeremmfr/go-netconf v0.1.4
github.com/jeremmfr/junosdecode v0.1.0
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
Expand Down
194 changes: 22 additions & 172 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion junos/func_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func logFile(message string, file string) {
Expand Down
2 changes: 1 addition & 1 deletion junos/func_resource_bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/jeremmfr/junosdecode/jdecode"
)

Expand Down
4 changes: 2 additions & 2 deletions junos/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package junos
import (
"sync"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions junos/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type applicationOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_application_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type applicationSetOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_application_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosApplicationSet_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosApplication_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_bgp_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func resourceBgpGroup() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_bgp_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosBgpGroup_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_bgp_neighbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func resourceBgpNeighbor() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_bgp_neighbor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosBgpNeighbor_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_firewall_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type filterOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_firewall_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosFirewallFilter_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_firewall_policer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type policerOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_firewall_policer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosFirewallPolicer_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/jeremmfr/junosdecode/jdecode"
)

Expand Down
2 changes: 1 addition & 1 deletion junos/resource_interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

// export TESTACC_INTERFACE=<inteface> for choose interface available else it's ge-0/0/3
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_ospf_area.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ospfAreaOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_ospf_area_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosOspfArea_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_policyoptions_as_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type asPathOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_policyoptions_as_path_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type asPathGroupOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_policyoptions_community.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type communityOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_policyoptions_policy_statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type policyStatementOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_policyoptions_prefix_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type prefixListOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_policyoptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosPolicyOptions_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_rib_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ribGroupOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_rib_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosRibGroup_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_routing_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type instanceOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_routing_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosRoutingInstance_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ike_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ikeGatewayOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ike_ipsec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosSecurityIkeIpsec_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ike_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/jeremmfr/junosdecode/jdecode"
)

Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ike_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ikeProposalOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ipsec_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ipsecPolicyOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ipsec_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ipsecProposalOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_ipsec_vpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type ipsecVpnOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_nat_destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type natDestinationOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_nat_destination_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type natDestinationPoolOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_nat_destination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccJunosSecurityNatDestination_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_nat_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type natSourceOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion junos/resource_security_nat_source_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

type natSourcePoolOptions struct {
Expand Down
Loading

0 comments on commit 241fbda

Please sign in to comment.