Skip to content

Commit

Permalink
rename evry functions
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Apr 2, 2024
1 parent f876d06 commit 957c9c4
Show file tree
Hide file tree
Showing 51 changed files with 490 additions and 490 deletions.
96 changes: 48 additions & 48 deletions outscale/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,56 +52,56 @@ func Provider() *schema.Provider {
},

ResourcesMap: map[string]*schema.Resource{
"outscale_vm": resourceOutscaleOApiVM(),
"outscale_keypair": resourceOutscaleOAPIKeyPair(),
"outscale_image": resourceOutscaleOAPIImage(),
"outscale_internet_service_link": resourceOutscaleOAPIInternetServiceLink(),
"outscale_internet_service": resourceOutscaleOAPIInternetService(),
"outscale_net": resourceOutscaleOAPINet(),
"outscale_security_group": resourceOutscaleOAPISecurityGroup(),
"outscale_outbound_rule": resourceOutscaleOAPIOutboundRule(),
"outscale_security_group_rule": resourceOutscaleOAPIOutboundRule(),
"outscale_tag": resourceOutscaleOAPITags(),
"outscale_public_ip": resourceOutscaleOAPIPublicIP(),
"outscale_public_ip_link": resourceOutscaleOAPIPublicIPLink(),
"outscale_volume": resourceOutscaleOAPIVolume(),
"outscale_volumes_link": resourceOutscaleOAPIVolumeLink(),
"outscale_net_attributes": resourceOutscaleOAPILinAttributes(),
"outscale_nat_service": resourceOutscaleOAPINatService(),
"outscale_subnet": resourceOutscaleOAPISubNet(),
"outscale_route": resourceOutscaleOAPIRoute(),
"outscale_route_table": resourceOutscaleOAPIRouteTable(),
"outscale_route_table_link": resourceOutscaleOAPILinkRouteTable(),
"outscale_nic": resourceOutscaleOAPINic(),
"outscale_snapshot": resourceOutscaleOAPISnapshot(),
"outscale_image_launch_permission": resourceOutscaleOAPIImageLaunchPermission(),
"outscale_net_peering": resourceOutscaleOAPILinPeeringConnection(),
"outscale_net_peering_acceptation": resourceOutscaleOAPILinPeeringConnectionAccepter(),
"outscale_net_access_point": resourceOutscaleNetAccessPoint(),
"outscale_nic_link": resourceOutscaleOAPINetworkInterfaceAttachment(),
"outscale_nic_private_ip": resourceOutscaleOAPINetworkInterfacePrivateIP(),
"outscale_vm": ResourceOutscaleOApiVM(),
"outscale_keypair": ResourceOutscaleOAPIKeyPair(),
"outscale_image": ResourceOutscaleOAPIImage(),
"outscale_internet_service_link": ResourceOutscaleOAPIInternetServiceLink(),
"outscale_internet_service": ResourceOutscaleOAPIInternetService(),
"outscale_net": ResourceOutscaleOAPINet(),
"outscale_security_group": ResourceOutscaleOAPISecurityGroup(),
"outscale_outbound_rule": ResourceOutscaleOAPIOutboundRule(),
"outscale_security_group_rule": ResourceOutscaleOAPIOutboundRule(),
"outscale_tag": ResourceOutscaleOAPITags(),
"outscale_public_ip": ResourceOutscaleOAPIPublicIP(),
"outscale_public_ip_link": ResourceOutscaleOAPIPublicIPLink(),
"outscale_volume": ResourceOutscaleOAPIVolume(),
"outscale_volumes_link": ResourceOutscaleOAPIVolumeLink(),
"outscale_net_attributes": ResourceOutscaleOAPILinAttributes(),
"outscale_nat_service": ResourceOutscaleOAPINatService(),
"outscale_subnet": ResourceOutscaleOAPISubNet(),
"outscale_route": ResourceOutscaleOAPIRoute(),
"outscale_route_table": ResourceOutscaleOAPIRouteTable(),
"outscale_route_table_link": ResourceOutscaleOAPILinkRouteTable(),
"outscale_nic": ResourceOutscaleOAPINic(),
"outscale_snapshot": ResourceOutscaleOAPISnapshot(),
"outscale_image_launch_permission": ResourceOutscaleOAPIImageLaunchPermission(),
"outscale_net_peering": ResourceOutscaleOAPILinPeeringConnection(),
"outscale_net_peering_acceptation": ResourceOutscaleOAPILinPeeringConnectionAccepter(),
"outscale_net_access_point": ResourceOutscaleNetAccessPoint(),
"outscale_nic_link": ResourceOutscaleOAPINetworkInterfaceAttachment(),
"outscale_nic_private_ip": ResourceOutscaleOAPINetworkInterfacePrivateIP(),
"outscale_snapshot_attributes": resourcedOutscaleOAPISnapshotAttributes(),
"outscale_dhcp_option": resourceOutscaleDHCPOption(),
"outscale_client_gateway": resourceOutscaleClientGateway(),
"outscale_virtual_gateway": resourceOutscaleOAPIVirtualGateway(),
"outscale_virtual_gateway_link": resourceOutscaleOAPIVirtualGatewayLink(),
"outscale_virtual_gateway_route_propagation": resourceOutscaleOAPIVirtualGatewayRoutePropagation(),
"outscale_vpn_connection": resourceOutscaleVPNConnection(),
"outscale_vpn_connection_route": resourceOutscaleVPNConnectionRoute(),
"outscale_access_key": resourceOutscaleAccessKey(),
"outscale_load_balancer": resourceOutscaleOAPILoadBalancer(),
"outscale_load_balancer_policy": resourceOutscaleAppCookieStickinessPolicy(),
"outscale_dhcp_option": ResourceOutscaleDHCPOption(),
"outscale_client_gateway": ResourceOutscaleClientGateway(),
"outscale_virtual_gateway": ResourceOutscaleOAPIVirtualGateway(),
"outscale_virtual_gateway_link": ResourceOutscaleOAPIVirtualGatewayLink(),
"outscale_virtual_gateway_route_propagation": ResourceOutscaleOAPIVirtualGatewayRoutePropagation(),
"outscale_vpn_connection": ResourceOutscaleVPNConnection(),
"outscale_vpn_connection_route": ResourceOutscaleVPNConnectionRoute(),
"outscale_access_key": ResourceOutscaleAccessKey(),
"outscale_load_balancer": ResourceOutscaleOAPILoadBalancer(),
"outscale_load_balancer_policy": ResourceOutscaleAppCookieStickinessPolicy(),
"outscale_load_balancer_vms": resourceLBUAttachment(),
"outscale_load_balancer_attributes": resourceOutscaleOAPILoadBalancerAttributes(),
"outscale_load_balancer_listener_rule": resourceOutscaleLoadBalancerListenerRule(),
"outscale_flexible_gpu": resourceOutscaleOAPIFlexibleGpu(),
"outscale_flexible_gpu_link": resourceOutscaleOAPIFlexibleGpuLink(),
"outscale_image_export_task": resourceOutscaleOAPIIMageExportTask(),
"outscale_server_certificate": resourceOutscaleOAPIServerCertificate(),
"outscale_snapshot_export_task": resourceOutscaleOAPISnapshotExportTask(),
"outscale_ca": resourceOutscaleOAPICa(),
"outscale_api_access_rule": resourceOutscaleOAPIApiAccessRule(),
"outscale_api_access_policy": resourceOutscaleOAPIApiAccessPolicy(),
"outscale_load_balancer_attributes": ResourceOutscaleOAPILoadBalancerAttributes(),
"outscale_load_balancer_listener_rule": ResourceOutscaleLoadBalancerListenerRule(),
"outscale_flexible_gpu": ResourceOutscaleOAPIFlexibleGpu(),
"outscale_flexible_gpu_link": ResourceOutscaleOAPIFlexibleGpuLink(),
"outscale_image_export_task": ResourceOutscaleOAPIIMageExportTask(),
"outscale_server_certificate": ResourceOutscaleOAPIServerCertificate(),
"outscale_snapshot_export_task": ResourceOutscaleOAPISnapshotExportTask(),
"outscale_ca": ResourceOutscaleOAPICa(),
"outscale_api_access_rule": ResourceOutscaleOAPIApiAccessRule(),
"outscale_api_access_policy": ResourceOutscaleOAPIApiAccessPolicy(),
"outscale_main_route_table_link": resourceLinkMainRouteTable(),
},
DataSourcesMap: map[string]*schema.Resource{
Expand Down
22 changes: 11 additions & 11 deletions outscale/resource_outscale_access_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"github.com/outscale/terraform-provider-outscale/utils"
)

func resourceOutscaleAccessKey() *schema.Resource {
func ResourceOutscaleAccessKey() *schema.Resource {
return &schema.Resource{
Create: resourceOutscaleAccessKeyCreate,
Read: resourceOutscaleAccessKeyRead,
Update: resourceOutscaleAccessKeyUpdate,
Delete: resourceOutscaleAccessKeyDelete,
Create: ResourceOutscaleAccessKeyCreate,
Read: ResourceOutscaleAccessKeyRead,
Update: ResourceOutscaleAccessKeyUpdate,
Delete: ResourceOutscaleAccessKeyDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down Expand Up @@ -63,7 +63,7 @@ func resourceOutscaleAccessKey() *schema.Resource {
}
}

func resourceOutscaleAccessKeyCreate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleAccessKeyCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

var err error
Expand Down Expand Up @@ -98,10 +98,10 @@ func resourceOutscaleAccessKeyCreate(d *schema.ResourceData, meta interface{}) e
}
}

return resourceOutscaleAccessKeyRead(d, meta)
return ResourceOutscaleAccessKeyRead(d, meta)
}

func resourceOutscaleAccessKeyRead(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleAccessKeyRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

filter := oscgo.ReadSecretAccessKeyRequest{
Expand Down Expand Up @@ -149,7 +149,7 @@ func resourceOutscaleAccessKeyRead(d *schema.ResourceData, meta interface{}) err
return nil
}

func resourceOutscaleAccessKeyUpdate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleAccessKeyUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI
req := oscgo.UpdateAccessKeyRequest{AccessKeyId: d.Id()}

Expand Down Expand Up @@ -178,10 +178,10 @@ func resourceOutscaleAccessKeyUpdate(d *schema.ResourceData, meta interface{}) e
if err != nil {
return err
}
return resourceOutscaleAccessKeyRead(d, meta)
return ResourceOutscaleAccessKeyRead(d, meta)
}

func resourceOutscaleAccessKeyDelete(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleAccessKeyDelete(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.DeleteAccessKeyRequest{
Expand Down
22 changes: 11 additions & 11 deletions outscale/resource_outscale_api_access_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"github.com/outscale/terraform-provider-outscale/utils"
)

func resourceOutscaleOAPIApiAccessPolicy() *schema.Resource {
func ResourceOutscaleOAPIApiAccessPolicy() *schema.Resource {
return &schema.Resource{
Create: resourceOutscaleOAPIApiAccessPolicyCreate,
Read: resourceOutscaleOAPIApiAccessPolicyRead,
Update: resourceOutscaleOAPIApiAccessPolicyUpdate,
Delete: resourceOutscaleOAPIApiAccessPolicyDelete,
Create: ResourceOutscaleOAPIApiAccessPolicyCreate,
Read: ResourceOutscaleOAPIApiAccessPolicyRead,
Update: ResourceOutscaleOAPIApiAccessPolicyUpdate,
Delete: ResourceOutscaleOAPIApiAccessPolicyDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand All @@ -37,7 +37,7 @@ func resourceOutscaleOAPIApiAccessPolicy() *schema.Resource {
}
}

func resourceOutscaleOAPIApiAccessPolicyCreate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessPolicyCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

maxAcc := d.Get("max_access_key_expiration_seconds")
Expand All @@ -63,10 +63,10 @@ func resourceOutscaleOAPIApiAccessPolicyCreate(d *schema.ResourceData, meta inte
if err != nil {
return err
}
return resourceOutscaleOAPIApiAccessPolicyRead(d, meta)
return ResourceOutscaleOAPIApiAccessPolicyRead(d, meta)
}

func resourceOutscaleOAPIApiAccessPolicyRead(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessPolicyRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.ReadApiAccessPolicyRequest{}
Expand Down Expand Up @@ -102,7 +102,7 @@ func resourceOutscaleOAPIApiAccessPolicyRead(d *schema.ResourceData, meta interf
return nil
}

func resourceOutscaleOAPIApiAccessPolicyUpdate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessPolicyUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

_, maxAcc := d.GetChange("max_access_key_expiration_seconds")
Expand All @@ -128,10 +128,10 @@ func resourceOutscaleOAPIApiAccessPolicyUpdate(d *schema.ResourceData, meta inte
if err != nil {
return err
}
return resourceOutscaleOAPIApiAccessPolicyRead(d, meta)
return ResourceOutscaleOAPIApiAccessPolicyRead(d, meta)
}

func resourceOutscaleOAPIApiAccessPolicyDelete(d *schema.ResourceData, _ interface{}) error {
func ResourceOutscaleOAPIApiAccessPolicyDelete(d *schema.ResourceData, _ interface{}) error {
d.SetId("")
return nil
}
22 changes: 11 additions & 11 deletions outscale/resource_outscale_api_access_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"github.com/spf13/cast"
)

func resourceOutscaleOAPIApiAccessRule() *schema.Resource {
func ResourceOutscaleOAPIApiAccessRule() *schema.Resource {
return &schema.Resource{
Create: resourceOutscaleOAPIApiAccessRuleCreate,
Read: resourceOutscaleOAPIApiAccessRuleRead,
Update: resourceOutscaleOAPIApiAccessRuleUpdate,
Delete: resourceOutscaleOAPIApiAccessRuleDelete,
Create: ResourceOutscaleOAPIApiAccessRuleCreate,
Read: ResourceOutscaleOAPIApiAccessRuleRead,
Update: ResourceOutscaleOAPIApiAccessRuleUpdate,
Delete: ResourceOutscaleOAPIApiAccessRuleDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down Expand Up @@ -53,7 +53,7 @@ func resourceOutscaleOAPIApiAccessRule() *schema.Resource {
}
}

func resourceOutscaleOAPIApiAccessRuleCreate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessRuleCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI
var checkParam = false
req := oscgo.CreateApiAccessRuleRequest{}
Expand Down Expand Up @@ -92,10 +92,10 @@ func resourceOutscaleOAPIApiAccessRuleCreate(d *schema.ResourceData, meta interf
}
d.SetId(cast.ToString(resp.ApiAccessRule.GetApiAccessRuleId()))

return resourceOutscaleOAPIApiAccessRuleRead(d, meta)
return ResourceOutscaleOAPIApiAccessRuleRead(d, meta)
}

func resourceOutscaleOAPIApiAccessRuleRead(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessRuleRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.ReadApiAccessRulesRequest{
Expand Down Expand Up @@ -153,7 +153,7 @@ func resourceOutscaleOAPIApiAccessRuleRead(d *schema.ResourceData, meta interfac
return nil
}

func resourceOutscaleOAPIApiAccessRuleUpdate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessRuleUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

accRid, isIdOk := d.GetOk("api_access_rule_id")
Expand Down Expand Up @@ -197,10 +197,10 @@ func resourceOutscaleOAPIApiAccessRuleUpdate(d *schema.ResourceData, meta interf
if err != nil {
return err
}
return resourceOutscaleOAPIApiAccessRuleRead(d, meta)
return ResourceOutscaleOAPIApiAccessRuleRead(d, meta)
}

func resourceOutscaleOAPIApiAccessRuleDelete(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPIApiAccessRuleDelete(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.DeleteApiAccessRuleRequest{
Expand Down
22 changes: 11 additions & 11 deletions outscale/resource_outscale_ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"github.com/spf13/cast"
)

func resourceOutscaleOAPICa() *schema.Resource {
func ResourceOutscaleOAPICa() *schema.Resource {
return &schema.Resource{
Create: resourceOutscaleOAPICaCreate,
Read: resourceOutscaleOAPICaRead,
Update: resourceOutscaleOAPICaUpdate,
Delete: resourceOutscaleOAPICaDelete,
Create: ResourceOutscaleOAPICaCreate,
Read: ResourceOutscaleOAPICaRead,
Update: ResourceOutscaleOAPICaUpdate,
Delete: ResourceOutscaleOAPICaDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down Expand Up @@ -47,7 +47,7 @@ func resourceOutscaleOAPICa() *schema.Resource {
}
}

func resourceOutscaleOAPICaCreate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPICaCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

if _, ok := d.GetOk("ca_pem"); ok == false {
Expand Down Expand Up @@ -76,10 +76,10 @@ func resourceOutscaleOAPICaCreate(d *schema.ResourceData, meta interface{}) erro
}
d.SetId(cast.ToString(resp.Ca.GetCaId()))

return resourceOutscaleOAPICaRead(d, meta)
return ResourceOutscaleOAPICaRead(d, meta)
}

func resourceOutscaleOAPICaRead(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPICaRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.ReadCasRequest{
Expand Down Expand Up @@ -121,7 +121,7 @@ func resourceOutscaleOAPICaRead(d *schema.ResourceData, meta interface{}) error
return nil
}

func resourceOutscaleOAPICaUpdate(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPICaUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.UpdateCaRequest{
Expand All @@ -143,10 +143,10 @@ func resourceOutscaleOAPICaUpdate(d *schema.ResourceData, meta interface{}) erro
if err != nil {
return err
}
return resourceOutscaleOAPICaRead(d, meta)
return ResourceOutscaleOAPICaRead(d, meta)
}

func resourceOutscaleOAPICaDelete(d *schema.ResourceData, meta interface{}) error {
func ResourceOutscaleOAPICaDelete(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

req := oscgo.DeleteCaRequest{
Expand Down
Loading

0 comments on commit 957c9c4

Please sign in to comment.