Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic_loopback_ips and generic_loopback_ips_ipv6 to existing iota #280

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions apstra/two_stage_l3_clos_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const (
ResourceGroupNameLeafIp4
ResourceGroupNameLeafIp6
ResourceGroupNameAccessIp4
ResourceGroupNameGenericIp4
ResourceGroupNameGenericIp6
ResourceGroupNameSuperspineSpineIp4
ResourceGroupNameSuperspineSpineIp6
ResourceGroupNameSpineLeafIp4
Expand Down Expand Up @@ -80,6 +82,8 @@ const (
resourceGroupNameLeafIp4 = resourceGroupName("leaf_loopback_ips")
resourceGroupNameLeafIp6 = resourceGroupName("leaf_loopback_ips_ipv6")
resourceGroupNameAccessIp4 = resourceGroupName("access_loopback_ips")
resourceGroupNameGenericIp4 = resourceGroupName("generic_loopback_ips")
resourceGroupNameGenericIp6 = resourceGroupName("generic_loopback_ips_ipv6")
resourceGroupNameSuperspineSpineIp4 = resourceGroupName("spine_superspine_link_ips")
resourceGroupNameSuperspineSpineIp6 = resourceGroupName("ipv6_spine_superspine_link_ips")
resourceGroupNameSpineLeafIp4 = resourceGroupName("spine_leaf_link_ips")
Expand Down Expand Up @@ -145,6 +149,10 @@ func (o *ResourceGroupName) Type() ResourceType {
return ResourceTypeIp6Pool
case ResourceGroupNameAccessIp4:
return ResourceTypeIp4Pool
case ResourceGroupNameGenericIp4:
return ResourceTypeIp4Pool
case ResourceGroupNameGenericIp6:
return ResourceTypeIp6Pool
case ResourceGroupNameSuperspineSpineIp4:
return ResourceTypeIp4Pool
case ResourceGroupNameSuperspineSpineIp6:
Expand Down Expand Up @@ -227,6 +235,10 @@ func (o ResourceGroupName) raw() resourceGroupName {
return resourceGroupNameLeafIp6
case ResourceGroupNameAccessIp4:
return resourceGroupNameAccessIp4
case ResourceGroupNameGenericIp4:
return resourceGroupNameGenericIp4
case ResourceGroupNameGenericIp6:
return resourceGroupNameGenericIp6
case ResourceGroupNameSuperspineSpineIp4:
return resourceGroupNameSuperspineSpineIp4
case ResourceGroupNameSuperspineSpineIp6:
Expand Down Expand Up @@ -296,6 +308,10 @@ func (o resourceGroupName) parse() (int, error) {
return int(ResourceGroupNameLeafIp6), nil
case resourceGroupNameAccessIp4:
return int(ResourceGroupNameAccessIp4), nil
case resourceGroupNameGenericIp4:
return int(ResourceGroupNameGenericIp4), nil
case resourceGroupNameGenericIp6:
return int(ResourceGroupNameGenericIp6), nil
case resourceGroupNameSuperspineSpineIp4:
return int(ResourceGroupNameSuperspineSpineIp4), nil
case resourceGroupNameSuperspineSpineIp6:
Expand Down
4 changes: 3 additions & 1 deletion apstra/two_stage_l3_clos_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestSetGetResourceAllocation(t *testing.T) {

func TestAllResourceGroupNames(t *testing.T) {
all := AllResourceGroupNames()
expected := 30
expected := 32
if len(all) != expected {
t.Fatalf("expected %d resource group names, got %d", expected, len(all))
}
Expand Down Expand Up @@ -145,6 +145,8 @@ func TestTwoStageL3ClosResourceStrings(t *testing.T) {
{stringVal: "leaf_loopback_ips", intType: ResourceGroupNameLeafIp4, stringType: resourceGroupNameLeafIp4},
{stringVal: "leaf_loopback_ips_ipv6", intType: ResourceGroupNameLeafIp6, stringType: resourceGroupNameLeafIp6},
{stringVal: "access_loopback_ips", intType: ResourceGroupNameAccessIp4, stringType: resourceGroupNameAccessIp4},
{stringVal: "generic_loopback_ips", intType: ResourceGroupNameGenericIp4, stringType: resourceGroupNameGenericIp4},
{stringVal: "generic_loopback_ips_ipv6", intType: ResourceGroupNameGenericIp6, stringType: resourceGroupNameGenericIp6},
{stringVal: "spine_superspine_link_ips", intType: ResourceGroupNameSuperspineSpineIp4, stringType: resourceGroupNameSuperspineSpineIp4},
{stringVal: "ipv6_spine_superspine_link_ips", intType: ResourceGroupNameSuperspineSpineIp6, stringType: resourceGroupNameSuperspineSpineIp6},
{stringVal: "spine_leaf_link_ips", intType: ResourceGroupNameSpineLeafIp4, stringType: resourceGroupNameSpineLeafIp4},
Expand Down
Loading