Skip to content

Commit

Permalink
Merge pull request #1221 from ksamoray/vpc-api-gen
Browse files Browse the repository at this point in the history
API wrapper generator changes for VPC
  • Loading branch information
ksamoray authored Jun 11, 2024
2 parents d56363d + b476852 commit 2077922
Show file tree
Hide file tree
Showing 128 changed files with 224 additions and 142 deletions.
4 changes: 3 additions & 1 deletion api/api_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@
- client: github.com/vmware/vsphere-automation-sdk-go/services/nsxt/orgs/projects/infra/domains
model: github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model
type: Multitenancy
- client: github.com/vmware/vsphere-automation-sdk-go/services/nsxt/orgs/projects/vpcs
model: github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model
type: VPC
model_name: SecurityPolicy
obj_name: SecurityPolicy
client_name: SecurityPoliciesClient
Expand Down Expand Up @@ -986,7 +989,6 @@
- New
- Get
- Delete
- List
- Patch
- Update
- List
Expand Down
2 changes: 1 addition & 1 deletion api/api_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ New:
default:
return nil
}
return &${model_name}ClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &${model_name}ClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}
Get:
Convert: |2
Expand Down
2 changes: 1 addition & 1 deletion api/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewInfraClient(sessionContext utl.SessionContext, connector vapiProtocolCli
default:
return nil
}
return &InfraClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &InfraClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c InfraClientContext) Get(basePathParam *string, filterParam *string, typeFilterParam *string) (model0.Infra, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/context_profiles/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewAttributesClient(sessionContext utl.SessionContext, connector vapiProtoc
default:
return nil
}
return &AttributeClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &AttributeClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c AttributeClientContext) List(attributeKeyParam *string, attributeSourceParam *string, cursorParam *string, includeMarkForDeleteObjectsParam *bool, includedFieldsParam *string, pageSizeParam *int64, sortAscendingParam *bool, sortByParam *string) (model0.PolicyContextProfileListResult, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewDefaultClient(sessionContext utl.SessionContext, connector vapiProtocolC
default:
return nil
}
return &PolicyCustomAttributesClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &PolicyCustomAttributesClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c PolicyCustomAttributesClientContext) Create(policyCustomAttributesParam model0.PolicyCustomAttributes, actionParam string) error {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/dhcp_relay_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewDhcpRelayConfigsClient(sessionContext utl.SessionContext, connector vapi
default:
return nil
}
return &DhcpRelayConfigClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &DhcpRelayConfigClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c DhcpRelayConfigClientContext) Get(dhcpRelayConfigIdParam string) (model0.DhcpRelayConfig, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/dhcp_server_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewDhcpServerConfigsClient(sessionContext utl.SessionContext, connector vap
default:
return nil
}
return &DhcpServerConfigClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &DhcpServerConfigClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c DhcpServerConfigClientContext) Get(dhcpServerConfigIdParam string) (model0.DhcpServerConfig, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/domains/gateway_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewGatewayPoliciesClient(sessionContext utl.SessionContext, connector vapiP
default:
return nil
}
return &GatewayPolicyClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &GatewayPolicyClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c GatewayPolicyClientContext) Get(domainIdParam string, gatewayPolicyIdParam string) (model0.GatewayPolicy, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/domains/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewGroupsClient(sessionContext utl.SessionContext, connector vapiProtocolCl
default:
return nil
}
return &GroupClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &GroupClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c GroupClientContext) Get(domainIdParam string, groupIdParam string) (model0.Group, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewFirewallFloodProtectionProfileBindingMapsClient(sessionContext utl.Sessi
default:
return nil
}
return &PolicyFirewallFloodProtectionProfileBindingMapClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &PolicyFirewallFloodProtectionProfileBindingMapClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c PolicyFirewallFloodProtectionProfileBindingMapClientContext) Get(domainIdParam string, groupIdParam string, firewallFloodProtectionProfileBindingMapIdParam string) (model0.PolicyFirewallFloodProtectionProfileBindingMap, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/domains/ids_security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewIntrusionServicePoliciesClient(sessionContext utl.SessionContext, connec
default:
return nil
}
return &IdsSecurityPolicyClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &IdsSecurityPolicyClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c IdsSecurityPolicyClientContext) Get(domainIdParam string, policyIdParam string) (model0.IdsSecurityPolicy, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/domains/security_policies/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewRulesClient(sessionContext utl.SessionContext, connector vapiProtocolCli
default:
return nil
}
return &RuleClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &RuleClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c RuleClientContext) Get(domainIdParam string, securityPolicyIdParam string, ruleIdParam string) (model0.Rule, error) {
Expand Down
29 changes: 28 additions & 1 deletion api/infra/domains/security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
client0 "github.com/vmware/vsphere-automation-sdk-go/services/nsxt/infra/domains"
model0 "github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model"
client2 "github.com/vmware/vsphere-automation-sdk-go/services/nsxt/orgs/projects/infra/domains"
client3 "github.com/vmware/vsphere-automation-sdk-go/services/nsxt/orgs/projects/vpcs"

utl "github.com/vmware/terraform-provider-nsxt/api/utl"
)
Expand All @@ -31,10 +32,13 @@ func NewSecurityPoliciesClient(sessionContext utl.SessionContext, connector vapi
case utl.Multitenancy:
client = client2.NewSecurityPoliciesClient(connector)

case utl.VPC:
client = client3.NewSecurityPoliciesClient(connector)

default:
return nil
}
return &SecurityPolicyClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &SecurityPolicyClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c SecurityPolicyClientContext) Get(domainIdParam string, securityPolicyIdParam string) (model0.SecurityPolicy, error) {
Expand Down Expand Up @@ -67,6 +71,13 @@ func (c SecurityPolicyClientContext) Get(domainIdParam string, securityPolicyIdP
return obj, err
}

case utl.VPC:
client := c.Client.(client3.SecurityPoliciesClient)
obj, err = client.Get(utl.DefaultOrgID, c.ProjectID, c.VPCID, securityPolicyIdParam)
if err != nil {
return obj, err
}

default:
return obj, errors.New("invalid infrastructure for model")
}
Expand Down Expand Up @@ -94,6 +105,10 @@ func (c SecurityPolicyClientContext) Patch(domainIdParam string, securityPolicyI
client := c.Client.(client2.SecurityPoliciesClient)
err = client.Patch(utl.DefaultOrgID, c.ProjectID, domainIdParam, securityPolicyIdParam, securityPolicyParam)

case utl.VPC:
client := c.Client.(client3.SecurityPoliciesClient)
err = client.Patch(utl.DefaultOrgID, c.ProjectID, c.VPCID, securityPolicyIdParam, securityPolicyParam)

default:
err = errors.New("invalid infrastructure for model")
}
Expand Down Expand Up @@ -130,6 +145,10 @@ func (c SecurityPolicyClientContext) Update(domainIdParam string, securityPolicy
client := c.Client.(client2.SecurityPoliciesClient)
obj, err = client.Update(utl.DefaultOrgID, c.ProjectID, domainIdParam, securityPolicyIdParam, securityPolicyParam)

case utl.VPC:
client := c.Client.(client3.SecurityPoliciesClient)
obj, err = client.Update(utl.DefaultOrgID, c.ProjectID, c.VPCID, securityPolicyIdParam, securityPolicyParam)

default:
err = errors.New("invalid infrastructure for model")
}
Expand All @@ -153,6 +172,10 @@ func (c SecurityPolicyClientContext) Delete(domainIdParam string, securityPolicy
client := c.Client.(client2.SecurityPoliciesClient)
err = client.Delete(utl.DefaultOrgID, c.ProjectID, domainIdParam, securityPolicyIdParam)

case utl.VPC:
client := c.Client.(client3.SecurityPoliciesClient)
err = client.Delete(utl.DefaultOrgID, c.ProjectID, c.VPCID, securityPolicyIdParam)

default:
err = errors.New("invalid infrastructure for model")
}
Expand Down Expand Up @@ -185,6 +208,10 @@ func (c SecurityPolicyClientContext) List(domainIdParam string, cursorParam *str
client := c.Client.(client2.SecurityPoliciesClient)
obj, err = client.List(utl.DefaultOrgID, c.ProjectID, domainIdParam, cursorParam, includeMarkForDeleteObjectsParam, includeRuleCountParam, includedFieldsParam, pageSizeParam, sortAscendingParam, sortByParam)

case utl.VPC:
client := c.Client.(client3.SecurityPoliciesClient)
obj, err = client.List(utl.DefaultOrgID, c.ProjectID, c.VPCID, cursorParam, includeMarkForDeleteObjectsParam, includeRuleCountParam, includedFieldsParam, pageSizeParam, sortAscendingParam, sortByParam)

default:
err = errors.New("invalid infrastructure for model")
}
Expand Down
2 changes: 1 addition & 1 deletion api/infra/flood_protection_profiles_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewFloodProtectionProfilesClient(sessionContext utl.SessionContext, connect
default:
return nil
}
return &StructValueClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &StructValueClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c StructValueClientContext) Get(floodProtectionProfileIdParam string) (*model0.StructValue, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/gateway_qos_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewGatewayQosProfilesClient(sessionContext utl.SessionContext, connector va
default:
return nil
}
return &GatewayQosProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &GatewayQosProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c GatewayQosProfileClientContext) Get(qosProfileIdParam string) (model0.GatewayQosProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ip_address_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewIpBlocksClient(sessionContext utl.SessionContext, connector vapiProtocol
default:
return nil
}
return &IpAddressBlockClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &IpAddressBlockClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c IpAddressBlockClientContext) Get(ipBlockIdParam string, ignoreIpblockUsageParam *bool) (model0.IpAddressBlock, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ip_address_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewIpPoolsClient(sessionContext utl.SessionContext, connector vapiProtocolC
default:
return nil
}
return &IpAddressPoolClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &IpAddressPoolClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c IpAddressPoolClientContext) Get(ipPoolIdParam string) (model0.IpAddressPool, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ip_discovery_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewIpDiscoveryProfilesClient(sessionContext utl.SessionContext, connector v
default:
return nil
}
return &IPDiscoveryProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &IPDiscoveryProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c IPDiscoveryProfileClientContext) Get(ipDiscoveryProfileIdParam string) (model0.IPDiscoveryProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ip_pools/ip_address_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewIpAllocationsClient(sessionContext utl.SessionContext, connector vapiPro
default:
return nil
}
return &IpAddressAllocationClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &IpAddressAllocationClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c IpAddressAllocationClientContext) Get(ipPoolIdParam string, ipAllocationIdParam string) (model0.IpAddressAllocation, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ip_pools/ip_subnets_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewIpSubnetsClient(sessionContext utl.SessionContext, connector vapiProtoco
default:
return nil
}
return &StructValueClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &StructValueClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c StructValueClientContext) Get(ipPoolIdParam string, ipSubnetIdParam string) (*model0.StructValue, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ipv6_dad_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewIpv6DadProfilesClient(sessionContext utl.SessionContext, connector vapiP
default:
return nil
}
return &Ipv6DadProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &Ipv6DadProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c Ipv6DadProfileClientContext) Get(dadProfileIdParam string) (model0.Ipv6DadProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/ipv6_ndra_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewIpv6NdraProfilesClient(sessionContext utl.SessionContext, connector vapi
default:
return nil
}
return &Ipv6NdraProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &Ipv6NdraProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c Ipv6NdraProfileClientContext) Get(ndraProfileIdParam string) (model0.Ipv6NdraProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/mac_discovery_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewMacDiscoveryProfilesClient(sessionContext utl.SessionContext, connector
default:
return nil
}
return &MacDiscoveryProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &MacDiscoveryProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c MacDiscoveryProfileClientContext) Get(macDiscoveryProfileIdParam string) (model0.MacDiscoveryProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/policy_context_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewContextProfilesClient(sessionContext utl.SessionContext, connector vapiP
default:
return nil
}
return &PolicyContextProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &PolicyContextProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c PolicyContextProfileClientContext) Get(contextProfileIdParam string) (model0.PolicyContextProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/policy_dns_forwarder_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewDnsForwarderZonesClient(sessionContext utl.SessionContext, connector vap
default:
return nil
}
return &PolicyDnsForwarderZoneClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &PolicyDnsForwarderZoneClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c PolicyDnsForwarderZoneClientContext) Get(dnsForwarderZoneIdParam string) (model0.PolicyDnsForwarderZone, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/qos_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewQosProfilesClient(sessionContext utl.SessionContext, connector vapiProto
default:
return nil
}
return &QosProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &QosProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c QosProfileClientContext) Get(qosProfileIdParam string) (model0.QosProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/realized_state/realized_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewRealizedEntitiesClient(sessionContext utl.SessionContext, connector vapi
default:
return nil
}
return &RealizedEntityClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &RealizedEntityClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c RealizedEntityClientContext) List(intentPathParam string, sitePathParam *string) (model0.GenericPolicyRealizedResourceListResult, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/realized_state/virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewVirtualMachinesClient(sessionContext utl.SessionContext, connector vapiP
default:
return nil
}
return &VirtualMachineClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &VirtualMachineClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c VirtualMachineClientContext) List(cursorParam *string, enforcementPointPathParam *string, includeMarkForDeleteObjectsParam *bool, includedFieldsParam *string, pageSizeParam *int64, sortAscendingParam *bool, sortByParam *string) (model0.VirtualMachineListResult, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewSegmentsClient(sessionContext utl.SessionContext, connector vapiProtocol
default:
return nil
}
return &SegmentClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &SegmentClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c SegmentClientContext) Get(segmentIdParam string) (model0.Segment, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/segment_security_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewSegmentSecurityProfilesClient(sessionContext utl.SessionContext, connect
default:
return nil
}
return &SegmentSecurityProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &SegmentSecurityProfileClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c SegmentSecurityProfileClientContext) Get(segmentSecurityProfileIdParam string) (model0.SegmentSecurityProfile, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/infra/segments/dhcp_static_binding_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewDhcpStaticBindingConfigsClient(sessionContext utl.SessionContext, connec
default:
return nil
}
return &StructValueClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID}
return &StructValueClientContext{Client: client, ClientType: sessionContext.ClientType, ProjectID: sessionContext.ProjectID, VPCID: sessionContext.VPCID}
}

func (c StructValueClientContext) Get(segmentIdParam string, bindingIdParam string) (*model0.StructValue, error) {
Expand Down
Loading

0 comments on commit 2077922

Please sign in to comment.