diff --git a/pkg/ibmvpc/analysis_output_test.go b/pkg/ibmvpc/analysis_output_test.go index 9b256f7f7..77118e0ec 100644 --- a/pkg/ibmvpc/analysis_output_test.go +++ b/pkg/ibmvpc/analysis_output_test.go @@ -330,6 +330,12 @@ var tests = []*commonvpc.VpcGeneralTest{ UseCases: []vpcmodel.OutputUseCase{vpcmodel.EndpointsDiff}, Format: vpcmodel.Text, }, + { + // ports manipulation + InputConfig: "sg_testing1_diff_ports", + UseCases: []vpcmodel.OutputUseCase{vpcmodel.EndpointsDiff}, + Format: vpcmodel.Text, + }, // tgw examples { InputConfig: "tgw_basic_example", diff --git a/pkg/ibmvpc/examples/input/input_sg_testing1_diff_ports.json b/pkg/ibmvpc/examples/input/input_sg_testing1_diff_ports.json new file mode 100644 index 000000000..4757727e1 --- /dev/null +++ b/pkg/ibmvpc/examples/input/input_sg_testing1_diff_ports.json @@ -0,0 +1,1840 @@ +{ + "endpoint_gateways": [ + { + "created_at": "2023-03-26T08:58:43.000Z", + "crn": "crn:1", + "health_state": "ok", + "href": "href:2", + "id": "id:3", + "ips": [ + { + "address": "10.240.30.6", + "href": "href:4", + "id": "id:5", + "name": "vpe-for-etcd-db-ky", + "resource_type": "subnet_reserved_ip" + } + ], + "lifecycle_state": "stable", + "name": "db-endpoint-gateway-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "endpoint_gateway", + "security_groups": [ + { + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky" + } + ], + "service_endpoint": "ttt", + "service_endpoints": [ + "ttt" + ], + "tags": [], + "target": { + "crn": "crn:11", + "resource_type": "provider_cloud_service" + }, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky" + } + } + ], + "floating_ips": [ + { + "address": "52.118.184.123", + "created_at": "2023-03-26T07:40:08Z", + "crn": "crn:15", + "href": "href:16", + "id": "id:17", + "name": "floating-ip-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "status": "available", + "tags": [], + "target": { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "primary_ip": { + "address": "10.240.20.4", + "href": "href:20", + "id": "id:21", + "name": "unpopular-fool-uncapped-gallantly", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "address": "52.118.190.41", + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:23", + "href": "href:24", + "id": "id:25", + "name": "public-gw-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "status": "available", + "tags": [], + "target": { + "crn": "crn:26", + "href": "href:27", + "id": "id:28", + "name": "public-gw-ky", + "resource_type": "public_gateway" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "instances": [ + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:34" + }, + "href": "href:32", + "id": "id:33", + "name": "railing-repaint-cruller-surname", + "volume": { + "crn": "crn:35", + "href": "href:36", + "id": "id:37", + "name": "untimely-haunt-remand-alto" + } + }, + "created_at": "2023-03-26T07:40:05Z", + "crn": "crn:v1:staging:public:is:us-south:a/6527::vpc:a456", + "disks": [], + "href": "href:30", + "id": "id:31", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi1-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:40:05Z", + "floating_ips": [], + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.10.4", + "href": "href:43", + "id": "id:44", + "name": "tackiness-cupped-fragile-beak", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "name": "subnet1-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "primary_ip": { + "address": "10.240.10.4", + "href": "href:43", + "id": "id:44", + "name": "tackiness-cupped-fragile-beak", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "name": "subnet1-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:34" + }, + "href": "href:32", + "id": "id:33", + "name": "railing-repaint-cruller-surname", + "volume": { + "crn": "crn:35", + "href": "href:36", + "id": "id:37", + "name": "untimely-haunt-remand-alto" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:57" + }, + "href": "href:55", + "id": "id:56", + "name": "dimly-giggly-reviver-amusable", + "volume": { + "crn": "crn:58", + "href": "href:59", + "id": "id:60", + "name": "hamlet-plunder-decree-steed" + } + }, + "created_at": "2023-03-26T07:39:42Z", + "crn": "crn:52", + "disks": [], + "href": "href:53", + "id": "id:54", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi2-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:39:42Z", + "floating_ips": [ + { + "address": "52.118.184.123", + "crn": "crn:15", + "href": "href:16", + "id": "id:17", + "name": "floating-ip-ky" + } + ], + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.20.4", + "href": "href:20", + "id": "id:21", + "name": "unpopular-fool-uncapped-gallantly", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "name": "subnet2-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "primary_ip": { + "address": "10.240.20.4", + "href": "href:20", + "id": "id:21", + "name": "unpopular-fool-uncapped-gallantly", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "name": "subnet2-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:57" + }, + "href": "href:55", + "id": "id:56", + "name": "dimly-giggly-reviver-amusable", + "volume": { + "crn": "crn:58", + "href": "href:59", + "id": "id:60", + "name": "hamlet-plunder-decree-steed" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:72" + }, + "href": "href:70", + "id": "id:71", + "name": "occupier-eagle-slashing-empirical", + "volume": { + "crn": "crn:73", + "href": "href:74", + "id": "id:75", + "name": "powdered-reroute-poser-penny" + } + }, + "created_at": "2023-03-26T07:39:29Z", + "crn": "crn:67", + "disks": [], + "href": "href:68", + "id": "id:69", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi3a-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:39:29Z", + "floating_ips": [], + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.30.5", + "href": "href:78", + "id": "id:79", + "name": "twentieth-airport-immunize-afraid", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "primary_ip": { + "address": "10.240.30.5", + "href": "href:78", + "id": "id:79", + "name": "twentieth-airport-immunize-afraid", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:72" + }, + "href": "href:70", + "id": "id:71", + "name": "occupier-eagle-slashing-empirical", + "volume": { + "crn": "crn:73", + "href": "href:74", + "id": "id:75", + "name": "powdered-reroute-poser-penny" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:88" + }, + "href": "href:86", + "id": "id:87", + "name": "devourer-suspend-wrecking-glorious", + "volume": { + "crn": "crn:89", + "href": "href:90", + "id": "id:91", + "name": "amiable-sabbatical-cabbage-shortage" + } + }, + "created_at": "2023-03-26T07:39:29Z", + "crn": "crn:83", + "disks": [], + "href": "href:84", + "id": "id:85", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi3b-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:39:29Z", + "floating_ips": [], + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.30.4", + "href": "href:94", + "id": "id:95", + "name": "plethora-junkman-sevenfold-image", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "primary_ip": { + "address": "10.240.30.4", + "href": "href:94", + "id": "id:95", + "name": "plethora-junkman-sevenfold-image", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:88" + }, + "href": "href:86", + "id": "id:87", + "name": "devourer-suspend-wrecking-glorious", + "volume": { + "crn": "crn:89", + "href": "href:90", + "id": "id:91", + "name": "amiable-sabbatical-cabbage-shortage" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "network_acls": [ + { + "created_at": "2023-03-26T07:39:11Z", + "crn": "crn:96", + "href": "href:97", + "id": "id:98", + "name": "acl2-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:101", + "id": "id:102", + "name": "inbound" + }, + "created_at": "2023-03-26T07:39:12Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:99", + "id": "id:100", + "ip_version": "ipv4", + "name": "outbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:39:12Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:101", + "id": "id:102", + "ip_version": "ipv4", + "name": "inbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [ + { + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "name": "subnet2-ky", + "resource_type": "subnet" + } + ], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:103", + "href": "href:104", + "id": "id:105", + "name": "acl1-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:108", + "id": "id:109", + "name": "inbound" + }, + "created_at": "2023-03-26T07:39:10Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:106", + "id": "id:107", + "ip_version": "ipv4", + "name": "outbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:39:11Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:108", + "id": "id:109", + "ip_version": "ipv4", + "name": "inbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [ + { + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "name": "subnet1-ky", + "resource_type": "subnet" + } + ], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:110", + "href": "href:111", + "id": "id:112", + "name": "acl3-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:115", + "id": "id:116", + "name": "inbound" + }, + "created_at": "2023-03-26T07:39:11Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:113", + "id": "id:114", + "ip_version": "ipv4", + "name": "outbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:39:12Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:115", + "id": "id:116", + "ip_version": "ipv4", + "name": "inbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [ + { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + } + ], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:38:54Z", + "crn": "crn:117", + "href": "href:118", + "id": "id:119", + "name": "corrode-kilogram-cola-mandated", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:122", + "id": "id:123", + "name": "allow-outbound" + }, + "created_at": "2023-03-26T07:38:54Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:120", + "id": "id:121", + "ip_version": "ipv4", + "name": "allow-inbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:38:54Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:122", + "id": "id:123", + "ip_version": "ipv4", + "name": "allow-outbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + } + ], + "public_gateways": [ + { + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:26", + "floating_ip": { + "address": "52.118.190.41", + "crn": "crn:23", + "href": "href:24", + "id": "id:25", + "name": "public-gw-ky" + }, + "href": "href:27", + "id": "id:28", + "name": "public-gw-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "public_gateway", + "status": "available", + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "security_groups": [ + { + "created_at": "2023-03-26T07:39:11Z", + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:124", + "id": "id:125", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + }, + { + "direction": "inbound", + "href": "href:126", + "id": "id:127", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.30.0/24" + } + }, + { + "direction": "outbound", + "href": "href:124", + "id": "id:125", + "ip_version": "ipv4", + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + }, + { + "direction": "outbound", + "href": "href:124", + "id": "id:125", + "ip_version": "ipv4", + "protocol": "tcp", + "port_max": 200, + "port_min": 100, + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + } + ], + "tags": [], + "targets": [ + { + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "resource_type": "network_interface" + }, + { + "crn": "crn:1", + "href": "href:2", + "id": "id:3", + "name": "db-endpoint-gateway-ky", + "resource_type": "endpoint_gateway" + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:11Z", + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:128", + "id": "id:129", + "ip_version": "ipv4", + "protocol": "icmp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "142.0.0.0/7" + } + }, + { + "direction": "inbound", + "href": "href:130", + "id": "id:131", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky" + } + }, + { + "direction": "outbound", + "href": "href:132", + "id": "id:133", + "ip_version": "ipv4", + "port_max": 65535, + "port_min": 1, + "protocol": "udp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "161.26.0.0/16" + } + }, + { + "direction": "inbound", + "href": "href:134", + "id": "id:135", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + }, + { + "direction": "inbound", + "href": "href:136", + "id": "id:137", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky" + } + } + ], + "tags": [], + "targets": [ + { + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "resource_type": "network_interface" + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:09Z", + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:138", + "id": "id:139", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.20.0/24" + } + }, + { + "direction": "outbound", + "href": "href:140", + "id": "id:141", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.10.0/24" + } + }, + { + "direction": "inbound", + "href": "href:142", + "id": "id:143", + "ip_version": "ipv4", + "port_max": 22, + "port_min": 22, + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "address": "147.235.219.206" + } + }, + { + "direction": "outbound", + "href": "href:144", + "id": "id:145", + "ip_version": "ipv4", + "protocol": "icmp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "142.0.0.0/8" + } + }, + { + "direction": "inbound", + "href": "href:146", + "id": "id:147", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky" + } + }, + { + "direction": "outbound", + "href": "href:148", + "id": "id:149", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.30.0/24" + } + }, + { + "direction": "outbound", + "href": "href:150", + "id": "id:151", + "ip_version": "ipv4", + "port_max": 65535, + "port_min": 1, + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + }, + { + "direction": "inbound", + "href": "href:152", + "id": "id:153", + "ip_version": "ipv4", + "port_max": 65535, + "port_min": 1, + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + } + ], + "tags": [], + "targets": [ + { + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "resource_type": "network_interface" + }, + { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "resource_type": "network_interface" + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:38:54Z", + "crn": "crn:154", + "href": "href:155", + "id": "id:156", + "name": "shininess-disavow-whinny-canal", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:157", + "id": "id:158", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + }, + { + "direction": "inbound", + "href": "href:159", + "id": "id:160", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:154", + "href": "href:155", + "id": "id:156", + "name": "shininess-disavow-whinny-canal" + } + } + ], + "tags": [], + "targets": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + } + ], + "subnets": [ + { + "available_ipv4_address_count": 250, + "created_at": "2023-03-26T07:39:41Z", + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "ip_version": "ipv4", + "ipv4_cidr_block": "10.240.10.0/24", + "name": "subnet1-ky", + "network_acl": { + "crn": "crn:103", + "href": "href:104", + "id": "id:105", + "name": "acl1-ky" + }, + "public_gateway": { + "crn": "crn:26", + "href": "href:27", + "id": "id:28", + "name": "public-gw-ky", + "resource_type": "public_gateway" + }, + "reserved_ips": [ + { + "address": "10.240.10.0", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:161", + "id": "id:162", + "lifecycle_state": "stable", + "name": "ibm-network-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.1", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:163", + "id": "id:164", + "lifecycle_state": "stable", + "name": "ibm-default-gateway", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.2", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:165", + "id": "id:166", + "lifecycle_state": "stable", + "name": "ibm-dns-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.3", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:167", + "id": "id:168", + "lifecycle_state": "stable", + "name": "ibm-reserved-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.4", + "auto_delete": true, + "created_at": "2023-03-26T07:40:05Z", + "href": "href:43", + "id": "id:44", + "lifecycle_state": "stable", + "name": "tackiness-cupped-fragile-beak", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.10.255", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:169", + "id": "id:170", + "lifecycle_state": "stable", + "name": "ibm-broadcast-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + } + ], + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "subnet", + "routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "status": "available", + "tags": [ + "public" + ], + "total_ipv4_address_count": 256, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "available_ipv4_address_count": 250, + "created_at": "2023-03-26T07:39:29Z", + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "ip_version": "ipv4", + "ipv4_cidr_block": "10.240.20.0/24", + "name": "subnet2-ky", + "network_acl": { + "crn": "crn:96", + "href": "href:97", + "id": "id:98", + "name": "acl2-ky" + }, + "reserved_ips": [ + { + "address": "10.240.20.0", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:173", + "id": "id:174", + "lifecycle_state": "stable", + "name": "ibm-network-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.1", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:175", + "id": "id:176", + "lifecycle_state": "stable", + "name": "ibm-default-gateway", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.2", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:177", + "id": "id:178", + "lifecycle_state": "stable", + "name": "ibm-dns-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.3", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:179", + "id": "id:180", + "lifecycle_state": "stable", + "name": "ibm-reserved-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.4", + "auto_delete": true, + "created_at": "2023-03-26T07:39:42Z", + "href": "href:20", + "id": "id:21", + "lifecycle_state": "stable", + "name": "unpopular-fool-uncapped-gallantly", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.20.255", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:181", + "id": "id:182", + "lifecycle_state": "stable", + "name": "ibm-broadcast-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + } + ], + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "subnet", + "routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "status": "available", + "tags": [ + "public" + ], + "total_ipv4_address_count": 256, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "available_ipv4_address_count": 248, + "created_at": "2023-03-26T07:39:15Z", + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "ip_version": "ipv4", + "ipv4_cidr_block": "10.240.30.0/24", + "name": "subnet3-ky", + "network_acl": { + "crn": "crn:110", + "href": "href:111", + "id": "id:112", + "name": "acl3-ky" + }, + "reserved_ips": [ + { + "address": "10.240.30.0", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:183", + "id": "id:184", + "lifecycle_state": "stable", + "name": "ibm-network-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.1", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:185", + "id": "id:186", + "lifecycle_state": "stable", + "name": "ibm-default-gateway", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.2", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:187", + "id": "id:188", + "lifecycle_state": "stable", + "name": "ibm-dns-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.3", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:189", + "id": "id:190", + "lifecycle_state": "stable", + "name": "ibm-reserved-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.4", + "auto_delete": true, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:94", + "id": "id:95", + "lifecycle_state": "stable", + "name": "plethora-junkman-sevenfold-image", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.30.5", + "auto_delete": true, + "created_at": "2023-03-26T07:39:30Z", + "href": "href:78", + "id": "id:79", + "lifecycle_state": "stable", + "name": "twentieth-airport-immunize-afraid", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.30.6", + "auto_delete": true, + "created_at": "2023-03-26T08:58:46Z", + "href": "href:4", + "id": "id:5", + "lifecycle_state": "stable", + "name": "vpe-for-etcd-db-ky", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "crn": "crn:1", + "href": "href:2", + "id": "id:3", + "name": "db-endpoint-gateway-ky", + "resource_type": "endpoint_gateway" + } + }, + { + "address": "10.240.30.255", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:191", + "id": "id:192", + "lifecycle_state": "stable", + "name": "ibm-broadcast-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + } + ], + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "subnet", + "routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "status": "available", + "tags": [ + "private" + ], + "total_ipv4_address_count": 256, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "vpcs": [ + { + "classic_access": false, + "created_at": "2023-03-26T07:38:54Z", + "crn": "crn:12", + "cse_source_ips": [ + { + "ip": { + "address": "10.249.196.57" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "ip": { + "address": "10.249.205.252" + }, + "zone": { + "href": "href:193", + "name": "us-south-2" + } + }, + { + "ip": { + "address": "10.12.167.235" + }, + "zone": { + "href": "href:194", + "name": "us-south-3" + } + } + ], + "default_network_acl": { + "crn": "crn:117", + "href": "href:118", + "id": "id:119", + "name": "corrode-kilogram-cola-mandated" + }, + "default_routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "default_security_group": { + "crn": "crn:154", + "href": "href:155", + "id": "id:156", + "name": "shininess-disavow-whinny-canal" + }, + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "vpc", + "status": "available", + "tags": [] + } + ] +} + diff --git a/pkg/ibmvpc/examples/input/input_sg_testing1_diff_ports_2nd.json b/pkg/ibmvpc/examples/input/input_sg_testing1_diff_ports_2nd.json new file mode 100644 index 000000000..7c500da07 --- /dev/null +++ b/pkg/ibmvpc/examples/input/input_sg_testing1_diff_ports_2nd.json @@ -0,0 +1,1844 @@ +{ + "endpoint_gateways": [ + { + "created_at": "2023-03-26T08:58:43.000Z", + "crn": "crn:1", + "health_state": "ok", + "href": "href:2", + "id": "id:3", + "ips": [ + { + "address": "10.240.30.6", + "href": "href:4", + "id": "id:5", + "name": "vpe-for-etcd-db-ky", + "resource_type": "subnet_reserved_ip" + } + ], + "lifecycle_state": "stable", + "name": "db-endpoint-gateway-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "endpoint_gateway", + "security_groups": [ + { + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky" + } + ], + "service_endpoint": "ttt", + "service_endpoints": [ + "ttt" + ], + "tags": [], + "target": { + "crn": "crn:11", + "resource_type": "provider_cloud_service" + }, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky" + } + } + ], + "floating_ips": [ + { + "address": "52.118.184.123", + "created_at": "2023-03-26T07:40:08Z", + "crn": "crn:15", + "href": "href:16", + "id": "id:17", + "name": "floating-ip-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "status": "available", + "tags": [], + "target": { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "primary_ip": { + "address": "10.240.20.4", + "href": "href:20", + "id": "id:21", + "name": "unpopular-fool-uncapped-gallantly", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "address": "52.118.190.41", + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:23", + "href": "href:24", + "id": "id:25", + "name": "public-gw-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "status": "available", + "tags": [], + "target": { + "crn": "crn:26", + "href": "href:27", + "id": "id:28", + "name": "public-gw-ky", + "resource_type": "public_gateway" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "instances": [ + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:34" + }, + "href": "href:32", + "id": "id:33", + "name": "railing-repaint-cruller-surname", + "volume": { + "crn": "crn:35", + "href": "href:36", + "id": "id:37", + "name": "untimely-haunt-remand-alto" + } + }, + "created_at": "2023-03-26T07:40:05Z", + "crn": "crn:v1:staging:public:is:us-south:a/6527::vpc:a456", + "disks": [], + "href": "href:30", + "id": "id:31", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi1-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:40:05Z", + "floating_ips": [], + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.10.4", + "href": "href:43", + "id": "id:44", + "name": "tackiness-cupped-fragile-beak", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "name": "subnet1-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "primary_ip": { + "address": "10.240.10.4", + "href": "href:43", + "id": "id:44", + "name": "tackiness-cupped-fragile-beak", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "name": "subnet1-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:34" + }, + "href": "href:32", + "id": "id:33", + "name": "railing-repaint-cruller-surname", + "volume": { + "crn": "crn:35", + "href": "href:36", + "id": "id:37", + "name": "untimely-haunt-remand-alto" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:57" + }, + "href": "href:55", + "id": "id:56", + "name": "dimly-giggly-reviver-amusable", + "volume": { + "crn": "crn:58", + "href": "href:59", + "id": "id:60", + "name": "hamlet-plunder-decree-steed" + } + }, + "created_at": "2023-03-26T07:39:42Z", + "crn": "crn:52", + "disks": [], + "href": "href:53", + "id": "id:54", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi2-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:39:42Z", + "floating_ips": [ + { + "address": "52.118.184.123", + "crn": "crn:15", + "href": "href:16", + "id": "id:17", + "name": "floating-ip-ky" + } + ], + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.20.4", + "href": "href:20", + "id": "id:21", + "name": "unpopular-fool-uncapped-gallantly", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "name": "subnet2-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "primary_ip": { + "address": "10.240.20.4", + "href": "href:20", + "id": "id:21", + "name": "unpopular-fool-uncapped-gallantly", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "name": "subnet2-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:57" + }, + "href": "href:55", + "id": "id:56", + "name": "dimly-giggly-reviver-amusable", + "volume": { + "crn": "crn:58", + "href": "href:59", + "id": "id:60", + "name": "hamlet-plunder-decree-steed" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:72" + }, + "href": "href:70", + "id": "id:71", + "name": "occupier-eagle-slashing-empirical", + "volume": { + "crn": "crn:73", + "href": "href:74", + "id": "id:75", + "name": "powdered-reroute-poser-penny" + } + }, + "created_at": "2023-03-26T07:39:29Z", + "crn": "crn:67", + "disks": [], + "href": "href:68", + "id": "id:69", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi3a-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:39:29Z", + "floating_ips": [], + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.30.5", + "href": "href:78", + "id": "id:79", + "name": "twentieth-airport-immunize-afraid", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "primary_ip": { + "address": "10.240.30.5", + "href": "href:78", + "id": "id:79", + "name": "twentieth-airport-immunize-afraid", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:72" + }, + "href": "href:70", + "id": "id:71", + "name": "occupier-eagle-slashing-empirical", + "volume": { + "crn": "crn:73", + "href": "href:74", + "id": "id:75", + "name": "powdered-reroute-poser-penny" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "availability_policy": { + "host_failure": "restart" + }, + "bandwidth": 4000, + "boot_volume_attachment": { + "device": { + "id": "id:88" + }, + "href": "href:86", + "id": "id:87", + "name": "devourer-suspend-wrecking-glorious", + "volume": { + "crn": "crn:89", + "href": "href:90", + "id": "id:91", + "name": "amiable-sabbatical-cabbage-shortage" + } + }, + "created_at": "2023-03-26T07:39:29Z", + "crn": "crn:83", + "disks": [], + "href": "href:84", + "id": "id:85", + "image": { + "crn": "crn:38", + "href": "href:39", + "id": "id:40", + "name": "ibm-centos-7-9-minimal-amd64-8" + }, + "lifecycle_reasons": [], + "lifecycle_state": "stable", + "memory": 4, + "metadata_service": { + "enabled": false, + "protocol": "http", + "response_hop_limit": 1 + }, + "name": "vsi3b-ky", + "network_interfaces": [ + { + "allow_ip_spoofing": false, + "created_at": "2023-03-26T07:39:29Z", + "floating_ips": [], + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "port_speed": 3000, + "primary_ip": { + "address": "10.240.30.4", + "href": "href:94", + "id": "id:95", + "name": "plethora-junkman-sevenfold-image", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "security_groups": [ + { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + ], + "status": "available", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + }, + "type": "primary" + } + ], + "numa_count": 1, + "primary_network_interface": { + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "primary_ip": { + "address": "10.240.30.4", + "href": "href:94", + "id": "id:95", + "name": "plethora-junkman-sevenfold-image", + "resource_type": "subnet_reserved_ip" + }, + "resource_type": "network_interface", + "subnet": { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + } + }, + "profile": { + "href": "href:51", + "name": "cx2-2x4" + }, + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "instance", + "startable": true, + "status": "running", + "status_reasons": [], + "tags": [], + "total_network_bandwidth": 3000, + "total_volume_bandwidth": 1000, + "vcpu": { + "architecture": "amd64", + "count": 2, + "manufacturer": "intel" + }, + "volume_attachments": [ + { + "device": { + "id": "id:88" + }, + "href": "href:86", + "id": "id:87", + "name": "devourer-suspend-wrecking-glorious", + "volume": { + "crn": "crn:89", + "href": "href:90", + "id": "id:91", + "name": "amiable-sabbatical-cabbage-shortage" + } + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "network_acls": [ + { + "created_at": "2023-03-26T07:39:11Z", + "crn": "crn:96", + "href": "href:97", + "id": "id:98", + "name": "acl2-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:101", + "id": "id:102", + "name": "inbound" + }, + "created_at": "2023-03-26T07:39:12Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:99", + "id": "id:100", + "ip_version": "ipv4", + "name": "outbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:39:12Z", + "destination": "0.0.0.0/0", + "destination_port_max": 300, + "destination_port_min": 22, + "direction": "inbound", + "href": "href:101", + "id": "id:102", + "ip_version": "ipv4", + "name": "inbound", + "protocol": "tcp", + "source": "0.0.0.0/0", + "source_port_max": 65535, + "source_port_min": 1 + } + ], + "subnets": [ + { + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "name": "subnet2-ky", + "resource_type": "subnet" + } + ], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:103", + "href": "href:104", + "id": "id:105", + "name": "acl1-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:108", + "id": "id:109", + "name": "inbound" + }, + "created_at": "2023-03-26T07:39:10Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:106", + "id": "id:107", + "ip_version": "ipv4", + "name": "outbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:39:11Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:108", + "id": "id:109", + "ip_version": "ipv4", + "name": "inbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [ + { + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "name": "subnet1-ky", + "resource_type": "subnet" + } + ], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:110", + "href": "href:111", + "id": "id:112", + "name": "acl3-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:115", + "id": "id:116", + "name": "inbound" + }, + "created_at": "2023-03-26T07:39:11Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:113", + "id": "id:114", + "ip_version": "ipv4", + "name": "outbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:39:12Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:115", + "id": "id:116", + "ip_version": "ipv4", + "name": "inbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [ + { + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "name": "subnet3-ky", + "resource_type": "subnet" + } + ], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:38:54Z", + "crn": "crn:117", + "href": "href:118", + "id": "id:119", + "name": "corrode-kilogram-cola-mandated", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "action": "allow", + "before": { + "href": "href:122", + "id": "id:123", + "name": "allow-outbound" + }, + "created_at": "2023-03-26T07:38:54Z", + "destination": "0.0.0.0/0", + "direction": "inbound", + "href": "href:120", + "id": "id:121", + "ip_version": "ipv4", + "name": "allow-inbound", + "protocol": "all", + "source": "0.0.0.0/0" + }, + { + "action": "allow", + "created_at": "2023-03-26T07:38:54Z", + "destination": "0.0.0.0/0", + "direction": "outbound", + "href": "href:122", + "id": "id:123", + "ip_version": "ipv4", + "name": "allow-outbound", + "protocol": "all", + "source": "0.0.0.0/0" + } + ], + "subnets": [], + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + } + ], + "public_gateways": [ + { + "created_at": "2023-03-26T07:39:10Z", + "crn": "crn:26", + "floating_ip": { + "address": "52.118.190.41", + "crn": "crn:23", + "href": "href:24", + "id": "id:25", + "name": "public-gw-ky" + }, + "href": "href:27", + "id": "id:28", + "name": "public-gw-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "public_gateway", + "status": "available", + "tags": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "security_groups": [ + { + "created_at": "2023-03-26T07:39:11Z", + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:124", + "id": "id:125", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + }, + { + "direction": "inbound", + "href": "href:126", + "id": "id:127", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.30.0/24" + } + }, + { + "direction": "outbound", + "href": "href:124", + "id": "id:125", + "ip_version": "ipv4", + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + }, + { + "direction": "outbound", + "href": "href:124", + "id": "id:125", + "ip_version": "ipv4", + "protocol": "tcp", + "port_max": 200, + "port_min": 100, + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + } + ], + "tags": [], + "targets": [ + { + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "resource_type": "network_interface" + }, + { + "crn": "crn:1", + "href": "href:2", + "id": "id:3", + "name": "db-endpoint-gateway-ky", + "resource_type": "endpoint_gateway" + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:11Z", + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:128", + "id": "id:129", + "ip_version": "ipv4", + "protocol": "icmp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "142.0.0.0/7" + } + }, + { + "direction": "inbound", + "href": "href:130", + "id": "id:131", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky" + } + }, + { + "direction": "outbound", + "href": "href:132", + "id": "id:133", + "ip_version": "ipv4", + "port_max": 65535, + "port_min": 1, + "protocol": "udp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "161.26.0.0/16" + } + }, + { + "direction": "inbound", + "href": "href:134", + "id": "id:135", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + }, + { + "direction": "inbound", + "href": "href:136", + "id": "id:137", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:8", + "href": "href:9", + "id": "id:10", + "name": "sg3-ky" + } + } + ], + "tags": [], + "targets": [ + { + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "resource_type": "network_interface" + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:39:09Z", + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:138", + "id": "id:139", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.20.0/24" + } + }, + { + "direction": "outbound", + "href": "href:140", + "id": "id:141", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.10.0/24" + } + }, + { + "direction": "inbound", + "href": "href:142", + "id": "id:143", + "ip_version": "ipv4", + "port_max": 22, + "port_min": 0, + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "address": "147.235.219.206" + } + }, + { + "direction": "outbound", + "href": "href:144", + "id": "id:145", + "ip_version": "ipv4", + "protocol": "icmp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "142.0.0.0/8" + } + }, + { + "direction": "inbound", + "href": "href:146", + "id": "id:147", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:45", + "href": "href:46", + "id": "id:47", + "name": "sg1-ky" + } + }, + { + "direction": "outbound", + "href": "href:148", + "id": "id:149", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "10.240.30.0/24" + } + }, + { + "direction": "outbound", + "href": "href:150", + "id": "id:151", + "ip_version": "ipv4", + "port_max": 65535, + "port_min": 1, + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + }, + { + "direction": "inbound", + "href": "href:152", + "id": "id:153", + "ip_version": "ipv4", + "port_max": 65535, + "port_min": 1, + "protocol": "tcp", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:61", + "href": "href:62", + "id": "id:63", + "name": "sg2-ky" + } + } + ], + "tags": [], + "targets": [ + { + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "resource_type": "network_interface" + }, + { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "resource_type": "network_interface" + } + ], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + }, + { + "created_at": "2023-03-26T07:38:54Z", + "crn": "crn:154", + "href": "href:155", + "id": "id:156", + "name": "shininess-disavow-whinny-canal", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "rules": [ + { + "direction": "outbound", + "href": "href:157", + "id": "id:158", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "cidr_block": "0.0.0.0/0" + } + }, + { + "direction": "inbound", + "href": "href:159", + "id": "id:160", + "ip_version": "ipv4", + "protocol": "all", + "local": { + "cidr_block": "0.0.0.0/0" + }, + "remote": { + "crn": "crn:154", + "href": "href:155", + "id": "id:156", + "name": "shininess-disavow-whinny-canal" + } + } + ], + "tags": [], + "targets": [], + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + } + } + ], + "subnets": [ + { + "available_ipv4_address_count": 250, + "created_at": "2023-03-26T07:39:41Z", + "crn": "crn:48", + "href": "href:49", + "id": "id:50", + "ip_version": "ipv4", + "ipv4_cidr_block": "10.240.10.0/24", + "name": "subnet1-ky", + "network_acl": { + "crn": "crn:103", + "href": "href:104", + "id": "id:105", + "name": "acl1-ky" + }, + "public_gateway": { + "crn": "crn:26", + "href": "href:27", + "id": "id:28", + "name": "public-gw-ky", + "resource_type": "public_gateway" + }, + "reserved_ips": [ + { + "address": "10.240.10.0", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:161", + "id": "id:162", + "lifecycle_state": "stable", + "name": "ibm-network-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.1", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:163", + "id": "id:164", + "lifecycle_state": "stable", + "name": "ibm-default-gateway", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.2", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:165", + "id": "id:166", + "lifecycle_state": "stable", + "name": "ibm-dns-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.3", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:167", + "id": "id:168", + "lifecycle_state": "stable", + "name": "ibm-reserved-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.10.4", + "auto_delete": true, + "created_at": "2023-03-26T07:40:05Z", + "href": "href:43", + "id": "id:44", + "lifecycle_state": "stable", + "name": "tackiness-cupped-fragile-beak", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:41", + "id": "id:42", + "name": "virtuous-familiar-oboe-hurdle", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.10.255", + "auto_delete": false, + "created_at": "2023-03-26T07:39:41Z", + "href": "href:169", + "id": "id:170", + "lifecycle_state": "stable", + "name": "ibm-broadcast-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + } + ], + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "subnet", + "routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "status": "available", + "tags": [ + "public" + ], + "total_ipv4_address_count": 256, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "available_ipv4_address_count": 250, + "created_at": "2023-03-26T07:39:29Z", + "crn": "crn:64", + "href": "href:65", + "id": "id:66", + "ip_version": "ipv4", + "ipv4_cidr_block": "10.240.20.0/24", + "name": "subnet2-ky", + "network_acl": { + "crn": "crn:96", + "href": "href:97", + "id": "id:98", + "name": "acl2-ky" + }, + "reserved_ips": [ + { + "address": "10.240.20.0", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:173", + "id": "id:174", + "lifecycle_state": "stable", + "name": "ibm-network-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.1", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:175", + "id": "id:176", + "lifecycle_state": "stable", + "name": "ibm-default-gateway", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.2", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:177", + "id": "id:178", + "lifecycle_state": "stable", + "name": "ibm-dns-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.3", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:179", + "id": "id:180", + "lifecycle_state": "stable", + "name": "ibm-reserved-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.20.4", + "auto_delete": true, + "created_at": "2023-03-26T07:39:42Z", + "href": "href:20", + "id": "id:21", + "lifecycle_state": "stable", + "name": "unpopular-fool-uncapped-gallantly", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:18", + "id": "id:19", + "name": "silencer-ointment-chafe-outlet", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.20.255", + "auto_delete": false, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:181", + "id": "id:182", + "lifecycle_state": "stable", + "name": "ibm-broadcast-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + } + ], + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "subnet", + "routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "status": "available", + "tags": [ + "public" + ], + "total_ipv4_address_count": 256, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "available_ipv4_address_count": 248, + "created_at": "2023-03-26T07:39:15Z", + "crn": "crn:80", + "href": "href:81", + "id": "id:82", + "ip_version": "ipv4", + "ipv4_cidr_block": "10.240.30.0/24", + "name": "subnet3-ky", + "network_acl": { + "crn": "crn:110", + "href": "href:111", + "id": "id:112", + "name": "acl3-ky" + }, + "reserved_ips": [ + { + "address": "10.240.30.0", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:183", + "id": "id:184", + "lifecycle_state": "stable", + "name": "ibm-network-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.1", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:185", + "id": "id:186", + "lifecycle_state": "stable", + "name": "ibm-default-gateway", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.2", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:187", + "id": "id:188", + "lifecycle_state": "stable", + "name": "ibm-dns-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.3", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:189", + "id": "id:190", + "lifecycle_state": "stable", + "name": "ibm-reserved-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + }, + { + "address": "10.240.30.4", + "auto_delete": true, + "created_at": "2023-03-26T07:39:29Z", + "href": "href:94", + "id": "id:95", + "lifecycle_state": "stable", + "name": "plethora-junkman-sevenfold-image", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:92", + "id": "id:93", + "name": "brunt-legacy-confound-sedate", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.30.5", + "auto_delete": true, + "created_at": "2023-03-26T07:39:30Z", + "href": "href:78", + "id": "id:79", + "lifecycle_state": "stable", + "name": "twentieth-airport-immunize-afraid", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "href": "href:76", + "id": "id:77", + "name": "pony-repressed-utility-wanting", + "resource_type": "network_interface" + } + }, + { + "address": "10.240.30.6", + "auto_delete": true, + "created_at": "2023-03-26T08:58:46Z", + "href": "href:4", + "id": "id:5", + "lifecycle_state": "stable", + "name": "vpe-for-etcd-db-ky", + "owner": "user", + "resource_type": "subnet_reserved_ip", + "target": { + "crn": "crn:1", + "href": "href:2", + "id": "id:3", + "name": "db-endpoint-gateway-ky", + "resource_type": "endpoint_gateway" + } + }, + { + "address": "10.240.30.255", + "auto_delete": false, + "created_at": "2023-03-26T07:39:15Z", + "href": "href:191", + "id": "id:192", + "lifecycle_state": "stable", + "name": "ibm-broadcast-address", + "owner": "provider", + "resource_type": "subnet_reserved_ip" + } + ], + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "subnet", + "routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "status": "available", + "tags": [ + "private" + ], + "total_ipv4_address_count": 256, + "vpc": { + "crn": "crn:12", + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_type": "vpc" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + } + ], + "vpcs": [ + { + "classic_access": false, + "created_at": "2023-03-26T07:38:54Z", + "crn": "crn:12", + "cse_source_ips": [ + { + "ip": { + "address": "10.249.196.57" + }, + "zone": { + "href": "href:22", + "name": "us-south-1" + } + }, + { + "ip": { + "address": "10.249.205.252" + }, + "zone": { + "href": "href:193", + "name": "us-south-2" + } + }, + { + "ip": { + "address": "10.12.167.235" + }, + "zone": { + "href": "href:194", + "name": "us-south-3" + } + } + ], + "default_network_acl": { + "crn": "crn:117", + "href": "href:118", + "id": "id:119", + "name": "corrode-kilogram-cola-mandated" + }, + "default_routing_table": { + "href": "href:171", + "id": "id:172", + "name": "moustache-bronchial-tribute-surrogate", + "resource_type": "routing_table" + }, + "default_security_group": { + "crn": "crn:154", + "href": "href:155", + "id": "id:156", + "name": "shininess-disavow-whinny-canal" + }, + "href": "href:13", + "id": "id:14", + "name": "test-vpc1-ky", + "resource_group": { + "href": "href:6", + "id": "id:7", + "name": "anonymous" + }, + "resource_type": "vpc", + "status": "available", + "tags": [] + } + ] +} + diff --git a/pkg/ibmvpc/examples/out/analysis_out/sg_testing1_diff_ports_all_vpcs_endpointsDiff.txt b/pkg/ibmvpc/examples/out/analysis_out/sg_testing1_diff_ports_all_vpcs_endpointsDiff.txt new file mode 100644 index 000000000..2d909104b --- /dev/null +++ b/pkg/ibmvpc/examples/out/analysis_out/sg_testing1_diff_ports_all_vpcs_endpointsDiff.txt @@ -0,0 +1,6 @@ +Connectivity diff between VPC test-vpc1-ky and VPC test-vpc1-ky +diff-type: changed, source: vsi2-ky[10.240.20.4], destination: vsi1-ky[10.240.10.4], config1: All Connections, config2: TCP src-ports: 1-21,301-65535 * ; ICMP,UDP; TCP src-ports: 22-300 +diff-type: changed, source: vsi2-ky[10.240.20.4], destination: vsi3b-ky[10.240.30.4], config1: TCP, config2: TCP src-ports: 1-21,301-65535 * ; TCP src-ports: 22-300 +diff-type: changed, source: vsi3b-ky[10.240.30.4], destination: vsi2-ky[10.240.20.4], config1: TCP, config2: TCP dst-ports: 22-300 + +TCP connections for which response is not permitted are marked with *