Skip to content

Commit

Permalink
Merge pull request #66 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop v1.0.2-beta
  • Loading branch information
fmunozmiranda authored Jul 11, 2022
2 parents 285bc22 + 752339f commit 74adf9b
Show file tree
Hide file tree
Showing 180 changed files with 246 additions and 228 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.0.2-beta (July 10, 2022)
BUGFIXES:
* `resource_sda_virtual_network` is now able to create the resource.
* `resource_site` is now able to read resource information.

IMPROVEMENTS:
* An example for resource `dnacenter_sda_virtual_network` was added.

## 1.0.1-beta (July 08, 2022)
BUG FIXES:
* Add `site_name_hierarchy`,`fabric_name`,`fabric_type`,`fabric_domain_type` parameters to `item` schema of `data_source_sda_fabric_site`
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTNAME=hashicorp.com
NAMESPACE=edu
NAME=dnacenter
BINARY=terraform-provider-${NAME}
VERSION=1.0.1-beta
VERSION=1.0.2-beta
OS_ARCH=darwin_amd64
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
WEBSITE_REPO=github.com/hashicorp/terraform-website
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Other versions of this collection have support for previous Cisco DNA Center ver
| 2.1.1 | 0.0.4 |
| 2.2.3.3 | 0.3.0-beta |
| 2.2.3.3 | 0.3.0 |
| 2.3.3.0 | 1.0.1-beta |
| 2.3.3.0 | 1.0.2-beta |

## Using the provider

Expand Down Expand Up @@ -61,7 +61,7 @@ To use this provider, copy and paste this code into your Terraform configuration
terraform {
required_providers {
dnacenter = {
source = "hashicorp.com/edu/dnacenter" version = "1.0.1-beta" }
source = "hashicorp.com/edu/dnacenter" version = "1.0.2-beta" }
}
}
Expand Down Expand Up @@ -122,7 +122,7 @@ $ make testacc

## Documentation

In the [docs directory](./docs/) you can find the documentation source for this 1.0.1-beta version.
In the [docs directory](./docs/) you can find the documentation source for this 1.0.2-beta version.

You can find the documentation online for the previously released versions at [Terraform Registry - Cisco DNA Center provider](https://registry.terraform.io/providers/cisco-en-programmability/dnacenter/latest/docs).

Expand All @@ -138,7 +138,7 @@ All notable changes to this project will be documented in the [CHANGELOG](./CHAN

The development team may make additional changes as the library evolves with the Cisco DNA Center.

**NOTE**: Consider reviewing the Changelog to review the new features of the 1.0.1-beta version.
**NOTE**: Consider reviewing the Changelog to review the new features of the 1.0.2-beta version.

## License

Expand Down
7 changes: 4 additions & 3 deletions dnacenter/resource_sda_virtual_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func resourceSdaVirtualNetworkCreate(ctx context.Context, d *schema.ResourceData

var diags diag.Diagnostics

resourceItem := *getResourceItem(d.Get("parameters"))
resourceItem := *getResourceItem(d.Get("parameters.0.payload"))
request1 := expandRequestSdaVirtualNetworkAddVnInFabric(ctx, "parameters.0", d)
if request1 != nil {
log.Printf("[DEBUG] request sent => %v", responseInterfaceToString(*request1))
Expand All @@ -141,7 +141,7 @@ func resourceSdaVirtualNetworkCreate(ctx context.Context, d *schema.ResourceData
queryParams1.SiteNameHierarchy = vvSiteNameHierarchy

getResponse2, restyResp1, err := client.Sda.GetVnFromSdaFabric(&queryParams1)
if err == nil && getResponse2 != nil {
if err == nil && getResponse2 != nil && getResponse2.Status != "failed" {
resourceMap := make(map[string]string)
resourceMap["virtual_network_name"] = vvVirtualNetworkName
resourceMap["site_name_hierarchy"] = vvSiteNameHierarchy
Expand Down Expand Up @@ -209,7 +209,8 @@ func resourceSdaVirtualNetworkRead(ctx context.Context, d *schema.ResourceData,
resourceMap := separateResourceID(resourceID)
vVirtualNetworkName := resourceMap["virtual_network_name"]
vSiteNameHierarchy := resourceMap["site_name_hierarchy"]

log.Printf("[DEBUG] test %s", vVirtualNetworkName)
log.Printf("[DEBUG] test %s", vSiteNameHierarchy)
selectedMethod := 1
if selectedMethod == 1 {
log.Printf("[DEBUG] Selected method 1: GetVnFromSdaFabric")
Expand Down
77 changes: 31 additions & 46 deletions dnacenter/resource_site.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ func resourceSite() *schema.Resource {
Schema: map[string]*schema.Schema{

"additional_info": &schema.Schema{
Description: `Additional Info`,
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{

Expand All @@ -59,90 +58,76 @@ func resourceSite() *schema.Resource {
Schema: map[string]*schema.Schema{

"address": &schema.Schema{
Description: `address`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"address_inherited_from": &schema.Schema{
Description: `addressInheritedFrom`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"country": &schema.Schema{
Description: `country`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"floor_index": &schema.Schema{
Description: `floorIndex`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"height": &schema.Schema{
Description: `height`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"latitude": &schema.Schema{
Description: `latitude`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"length": &schema.Schema{
Description: `length`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"longitude": &schema.Schema{
Description: `longitude`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"offset_x": &schema.Schema{
Description: `offsetX`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"offset_y": &schema.Schema{
Description: `offsetY`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"rf_model": &schema.Schema{
Description: `rfModel`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"type": &schema.Schema{
Description: `type`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},

"width": &schema.Schema{
Description: `width`,
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
},
},
},
},

"namespace": &schema.Schema{
Description: `namespace`,
Type: schema.TypeString,
Computed: true,
"name_space": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/samples/data-sources/dnacenter_app_policy/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.0.1-beta"
version = "1.0.2-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Loading

0 comments on commit 74adf9b

Please sign in to comment.