@@ -424,7 +424,7 @@ func createSPAccessPointTypeConfigSch() map[string]*schema.Schema {
424424 Description : "Api configuration details" ,
425425 MaxItems : 1 ,
426426 Elem : & schema.Resource {
427- Schema : createApiConfigSch (),
427+ Schema : createAPIConfigSch (),
428428 },
429429 },
430430 "authentication_key" : {
@@ -454,7 +454,7 @@ func createSPAccessPointTypeConfigSch() map[string]*schema.Schema {
454454 }
455455}
456456
457- func createApiConfigSch () map [string ]* schema.Schema {
457+ func createAPIConfigSch () map [string ]* schema.Schema {
458458 return map [string ]* schema.Schema {
459459 "api_available" : {
460460 Type : schema .TypeBool ,
@@ -1049,8 +1049,8 @@ func accessPointTypeConfigsTerraformToGo(schemaAccessPointTypeConfigs []interfac
10491049
10501050 if apMap ["api_config" ] != nil {
10511051 apiConfig := apMap ["api_config" ].(* schema.Set ).List ()
1052- spApiConfig := apiConfigTerraformToGo (apiConfig )
1053- accessPointTypeCOLO .SetApiConfig (spApiConfig )
1052+ spAPIConfig := apiConfigTerraformToGo (apiConfig )
1053+ accessPointTypeCOLO .SetApiConfig (spAPIConfig )
10541054 }
10551055
10561056 if apMap ["authentication_key" ] != nil {
@@ -1097,16 +1097,16 @@ func accessPointTypeConfigGoToTerraform(spAccessPointTypes []fabricv4.ServicePro
10971097
10981098func apiConfigGoToTerraform (apiConfig * fabricv4.ApiConfig ) * schema.Set {
10991099
1100- mappedApiConfig := make (map [string ]interface {})
1101- mappedApiConfig ["api_available" ] = apiConfig .GetApiAvailable ()
1102- mappedApiConfig ["equinix_managed_vlan" ] = apiConfig .GetEquinixManagedVlan ()
1103- mappedApiConfig ["bandwidth_from_api" ] = apiConfig .GetBandwidthFromApi ()
1104- mappedApiConfig ["integration_id" ] = apiConfig .GetIntegrationId ()
1105- mappedApiConfig ["equinix_managed_port" ] = apiConfig .GetEquinixManagedPort ()
1100+ mappedAPIConfig := make (map [string ]interface {})
1101+ mappedAPIConfig ["api_available" ] = apiConfig .GetApiAvailable ()
1102+ mappedAPIConfig ["equinix_managed_vlan" ] = apiConfig .GetEquinixManagedVlan ()
1103+ mappedAPIConfig ["bandwidth_from_api" ] = apiConfig .GetBandwidthFromApi ()
1104+ mappedAPIConfig ["integration_id" ] = apiConfig .GetIntegrationId ()
1105+ mappedAPIConfig ["equinix_managed_port" ] = apiConfig .GetEquinixManagedPort ()
11061106
11071107 apiConfigSet := schema .NewSet (
1108- schema .HashResource (& schema.Resource {Schema : createApiConfigSch ()}),
1109- []interface {}{mappedApiConfig })
1108+ schema .HashResource (& schema.Resource {Schema : createAPIConfigSch ()}),
1109+ []interface {}{mappedAPIConfig })
11101110 return apiConfigSet
11111111}
11121112
@@ -1141,13 +1141,13 @@ func apiConfigTerraformToGo(apiConfigs []interface{}) fabricv4.ApiConfig {
11411141 apiConfigMap := apiConfigs [0 ].(map [string ]interface {})
11421142 apiAvailable := apiConfigMap ["api_available" ].(bool )
11431143 equinixManagedVlan := apiConfigMap ["equinix_managed_vlan" ].(bool )
1144- bandwidthFromApi := apiConfigMap ["bandwidth_from_api" ].(bool )
1145- integrationId := apiConfigMap ["integration_id" ].(string )
1144+ bandwidthFromAPI := apiConfigMap ["bandwidth_from_api" ].(bool )
1145+ integrationID := apiConfigMap ["integration_id" ].(string )
11461146 equinixManagedPort := apiConfigMap ["equinix_managed_port" ].(bool )
11471147 apiConfig .SetApiAvailable (apiAvailable )
11481148 apiConfig .SetEquinixManagedVlan (equinixManagedVlan )
1149- apiConfig .SetBandwidthFromApi (bandwidthFromApi )
1150- apiConfig .SetIntegrationId (integrationId )
1149+ apiConfig .SetBandwidthFromApi (bandwidthFromAPI )
1150+ apiConfig .SetIntegrationId (integrationID )
11511151 apiConfig .SetEquinixManagedPort (equinixManagedPort )
11521152
11531153 return apiConfig
@@ -1249,15 +1249,15 @@ func portsTerraformToGo(schemaPorts []interface{}) []fabricv4.ServiceProfileAcce
12491249 portMap := schemaPort .(map [string ]interface {})
12501250 coloPort := fabricv4.ServiceProfileAccessPointCOLO {}
12511251
1252- type_ := portMap ["type" ].(string )
1253- if type_ != "" {
1254- pType := fabricv4 .ServiceProfileAccessPointCOLOType (type_ )
1252+ typeString := portMap ["type" ].(string )
1253+ if typeString != "" {
1254+ pType := fabricv4 .ServiceProfileAccessPointCOLOType (typeString )
12551255 coloPort .SetType (pType )
12561256 }
12571257
1258- pUuid := portMap ["uuid" ].(string )
1259- if pUuid != "" {
1260- coloPort .SetUuid (pUuid )
1258+ pUUID := portMap ["uuid" ].(string )
1259+ if pUUID != "" {
1260+ coloPort .SetUuid (pUUID )
12611261 }
12621262
12631263 locationList := portMap ["location" ].(* schema.Set ).List ()
@@ -1294,18 +1294,18 @@ func virtualDevicesTerraformToGo(schemaVirtualDevices []interface{}) []fabricv4.
12941294 for index , virtualDevice := range schemaVirtualDevices {
12951295 vdMap := virtualDevice .(map [string ]interface {})
12961296 vType := fabricv4 .ServiceProfileAccessPointVDType (vdMap ["type" ].(string ))
1297- vUuid := vdMap ["uuid" ].(string )
1297+ vUUID := vdMap ["uuid" ].(string )
12981298 locationList := vdMap ["location" ].(* schema.Set ).List ()
12991299 var vLocation fabricv4.SimplifiedLocation
13001300 if len (locationList ) != 0 {
13011301 vLocation = equinix_fabric_schema .LocationTerraformToGo (locationList )
13021302 }
1303- vInterfaceUuid := vdMap ["interface_uuid" ].(string )
1303+ vInterfaceUUID := vdMap ["interface_uuid" ].(string )
13041304 accessPointVD := fabricv4.ServiceProfileAccessPointVD {}
13051305 accessPointVD .SetType (vType )
1306- accessPointVD .SetUuid (vUuid )
1306+ accessPointVD .SetUuid (vUUID )
13071307 accessPointVD .SetLocation (vLocation )
1308- accessPointVD .SetInterfaceUuid (vInterfaceUuid )
1308+ accessPointVD .SetInterfaceUuid (vInterfaceUUID )
13091309 virtualDevices [index ] = accessPointVD
13101310 }
13111311 return virtualDevices
0 commit comments