Skip to content

Vpc_pair_4x initial CRUD changes#30

Open
tamilselvan085 wants to merge 1 commit into
developfrom
Vpc_pair_4x
Open

Vpc_pair_4x initial CRUD changes#30
tamilselvan085 wants to merge 1 commit into
developfrom
Vpc_pair_4x

Conversation

@tamilselvan085
Copy link
Copy Markdown
Collaborator

This PR implements the VPC Pair management module for ND 4.x

Changes:
Added nd_manage_vpc_pair module for VPC pair lifecycle management
Implemented initial CRUD models

UT:
tammurug@TAMMURUG-M-TH74 nd_vpc_pair % pwd
/Users/tammurug/go/src/terraform-provider-nd/examples/resources/nd_vpc_pair
tammurug@TAMMURUG-M-TH74 nd_vpc_pair % terraform apply

│ Warning: Provider development overrides are in effect

│ The following provider development overrides are set in the CLI configuration:
│ - ciscodevnet/ndfc in /Users/tammurug/go/bin
│ - cisco/ndfc in /Users/tammurug/go/bin
│ - ciscodevnet/nd in /Users/tammurug/go/bin

│ The behavior may therefore not match any released version of the provider and applying changes may cause
│ the state to become incompatible with published releases.

Terraform used the selected providers to generate the following execution plan. Resource actions are
indicated with the following symbols:

  • create

Terraform will perform the following actions:

nd_vpc_pair.test_resource_vpc_pair_1 will be created

  • resource "nd_vpc_pair" "test_resource_vpc_pair_1" {
    • deploy = true
    • fabric_name = "new_nd4_fabric_vxlan"
    • id = (known after apply)
    • peer_switch_id = "9FRGGCZT8LR"
    • switch_id = "96E0DGXYPV2"
    • use_virtual_peerlink = false
      }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

nd_vpc_pair.test_resource_vpc_pair_1: Creating...
nd_vpc_pair.test_resource_vpc_pair_1: Still creating... [00m10s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Still creating... [00m20s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Still creating... [00m30s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Still creating... [00m40s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Creation complete after 45s [id=new_nd4_fabric_vxlan/96E0DGXYPV2]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
tammurug@TAMMURUG-M-TH74 nd_vpc_pair % terraform destroy

│ Warning: Provider development overrides are in effect

│ The following provider development overrides are set in the CLI configuration:
│ - ciscodevnet/nd in /Users/tammurug/go/bin
│ - ciscodevnet/ndfc in /Users/tammurug/go/bin
│ - cisco/ndfc in /Users/tammurug/go/bin

│ The behavior may therefore not match any released version of the provider and applying changes may cause
│ the state to become incompatible with published releases.

nd_vpc_pair.test_resource_vpc_pair_1: Refreshing state... [id=new_nd4_fabric_vxlan/96E0DGXYPV2]

Terraform used the selected providers to generate the following execution plan. Resource actions are
indicated with the following symbols:

  • destroy

Terraform will perform the following actions:

nd_vpc_pair.test_resource_vpc_pair_1 will be destroyed

  • resource "nd_vpc_pair" "test_resource_vpc_pair_1" {
    • deploy = true -> null
    • fabric_name = "new_nd4_fabric_vxlan" -> null
    • id = "new_nd4_fabric_vxlan/96E0DGXYPV2" -> null
    • peer_switch_id = "9FRGGCZT8LR" -> null
    • switch_id = "96E0DGXYPV2" -> null
    • use_virtual_peerlink = false -> null
      }

Plan: 0 to add, 0 to change, 1 to destroy.

Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.

Enter a value: yes

nd_vpc_pair.test_resource_vpc_pair_1: Destroying... [id=new_nd4_fabric_vxlan/96E0DGXYPV2]
nd_vpc_pair.test_resource_vpc_pair_1: Still destroying... [id=new_nd4_fabric_vxlan/96E0DGXYPV2, 00m10s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Still destroying... [id=new_nd4_fabric_vxlan/96E0DGXYPV2, 00m20s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Still destroying... [id=new_nd4_fabric_vxlan/96E0DGXYPV2, 00m30s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Still destroying... [id=new_nd4_fabric_vxlan/96E0DGXYPV2, 00m40s elapsed]
nd_vpc_pair.test_resource_vpc_pair_1: Destruction complete after 50s

Destroy complete! Resources: 1 destroyed.
tammurug@TAMMURUG-M-TH74 nd_vpc_pair %

Comment on lines +10 to +15
provider "nd" {
username = "admin"
password = "Bgl12@123"
url = "https://10.104.251.111"
insecure = true
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove the login credentials.

Comment on lines +72 to +78
// func NewInventoryAPI(lock *sync.Mutex, client *nd.Client) *InventoryAPI {
// papi := new(InventoryAPI)
// papi.mutex = lock
// papi.Client = client
// papi.NDManageAPI = papi
// return papi
// }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you remove if it is not required?

Comment thread internal/manage/resource_vpc_pair/ndvpcpair.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants