Skip to content
Open
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
9 changes: 9 additions & 0 deletions cmd/cloudemu/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
"github.com/stackshy/cloudemu/v2/features/topology"
"github.com/stackshy/cloudemu/v2/persist"
eksprov "github.com/stackshy/cloudemu/v2/providers/aws/eks"
"github.com/stackshy/cloudemu/v2/providers/openshift/ocm"
"github.com/stackshy/cloudemu/v2/seed"
"github.com/stackshy/cloudemu/v2/server/admin"
awsserver "github.com/stackshy/cloudemu/v2/server/aws"
azureserver "github.com/stackshy/cloudemu/v2/server/azure"
gcpserver "github.com/stackshy/cloudemu/v2/server/gcp"
ociserver "github.com/stackshy/cloudemu/v2/server/oci"
ocmserver "github.com/stackshy/cloudemu/v2/server/openshift/ocm"
"github.com/stackshy/cloudemu/v2/services/kubernetes"
"github.com/stackshy/cloudemu/v2/services/pricing"
"github.com/stackshy/cloudemu/v2/services/resourcediscovery"
Expand Down Expand Up @@ -114,7 +116,7 @@
return err
}
if (c.tlsCert == "") != (c.tlsKey == "") {
return errors.New("--tls-cert and --tls-key must be given together")

Check failure on line 119 in cmd/cloudemu/serve.go

View workflow job for this annotation

GitHub Actions / Lint

do not define dynamic errors, use wrapped static errors instead: "errors.New(\"--tls-cert and --tls-key must be given together\")" (err113)
}

if c.persist && c.stateFile == "" {
Expand Down Expand Up @@ -206,6 +208,12 @@
// reference and needs it separately, or EKS still advertises
// the sentinel.
cloud.EKS.SetK8sAPI(k8s)
// ROSA/OCM: a Red Hat cluster-manager REST surface hosted on
// the AWS endpoint (rosa is AWS-only). Shares the same data
// plane so `rosa`-created clusters yield a working oc kubeconfig.
ocmMock := ocm.New(config.NewOptions(opts...))
ocmMock.SetK8sAPI(k8s)
d.OCM = ocmserver.New(ocmMock)
fresh["aws"] = wrap(awsserver.New(d), "aws", c.logReqs)
freshTargets["aws"] = seed.Target{Storage: cloud.S3, Database: cloud.DynamoDB, Secrets: cloud.SecretsManager, Compute: cloud.EC2}
freshEngine = topology.New(cloud.EC2, cloud.VPC, cloud.Route53)
Expand All @@ -223,6 +231,7 @@
d := azureserver.DriversFrom(cloud)
d.K8sAPI = k8s
cloud.AKS.SetK8sAPI(k8s)
cloud.ARO.SetK8sAPI(k8s)
fresh["azure"] = wrap(azureserver.New(d), "azure", c.logReqs)
freshTargets["azure"] = seed.Target{Storage: cloud.BlobStorage, Database: cloud.CosmosDB, Secrets: cloud.KeyVault, Compute: cloud.VirtualMachines}
freshDiscovery["azure"] = cloud.ResourceDiscovery
Expand Down Expand Up @@ -444,7 +453,7 @@

errCh := make(chan error, len(servers))
for i, s := range servers {
s := s

Check failure on line 456 in cmd/cloudemu/serve.go

View workflow job for this annotation

GitHub Actions / Lint

The copy of the 'for' variable "s" can be deleted (Go 1.22+) (copyloopvar)
ln := listeners[i]
go func() {
var err error
Expand Down Expand Up @@ -762,7 +771,7 @@
continue
}
if p != "aws" && p != "azure" && p != "gcp" && p != "oci" {
return nil, fmt.Errorf("unknown provider %q (want aws, azure, gcp, or oci)", p)

Check failure on line 774 in cmd/cloudemu/serve.go

View workflow job for this annotation

GitHub Actions / Lint

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"unknown provider %q (want aws, azure, gcp, or oci)\", p)" (err113)
}
if !seen[p] {
seen[p] = true
Expand All @@ -770,7 +779,7 @@
}
}
if len(out) == 0 {
return nil, errors.New("no providers selected")

Check failure on line 782 in cmd/cloudemu/serve.go

View workflow job for this annotation

GitHub Actions / Lint

do not define dynamic errors, use wrapped static errors instead: "errors.New(\"no providers selected\")" (err113)
}
return out, nil
}
2 changes: 1 addition & 1 deletion docs/coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ capability the code does not implement. Machine-readable: [`coverage.json`](./co
| `messagequeue` | [SQS](./aws/sqs.md) | [QueueStorage](./azure/queuestorage.md) | [PubSub](./gcp/pubsub.md) | — | 14 |
| `monitoring` | [CloudWatch](./aws/cloudwatch.md) | [Monitor](./azure/monitor.md) | [CloudMonitoring](./gcp/cloudmonitoring.md) | [Monitoring](./oci/monitoring.md) | 12 |
| `networkfirewall` | [NetworkFirewall](./aws/networkfirewall.md) | — | — | — | 20 |
| `networking` | [VPC](./aws/vpc.md) | | | [VCN](./oci/vcn.md) | 3 |
| `networking` | [VPC](./aws/vpc.md) | [VNet](./azure/vnet.md) | [VPC](./gcp/vpc.md) | [VCN](./oci/vcn.md) | 57 |
| `notification` | [SNS](./aws/sns.md) | [NotificationHubs](./azure/notificationhubs.md) | [FCM](./gcp/fcm.md) | — | 9 |
| `opensearch` | [OpenSearch](./aws/opensearch.md) | — | — | — | 96 |
| `parameterstore` | [SSM](./aws/ssm.md) | — | — | — | 9 |
Expand Down
2 changes: 1 addition & 1 deletion docs/coverage/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ Services cloudemu emulates for AWS, by native name. Back to the [cross-provider
| [SSM](./ssm.md) | `parameterstore` | 9 |
| [SageMaker](./sagemaker.md) | `sagemaker` | 121 |
| [SecretsManager](./secretsmanager.md) | `secrets` | 7 |
| [VPC](./vpc.md) | `networking` | 3 |
| [VPC](./vpc.md) | `networking` | 57 |
| [VPCLattice](./vpclattice.md) | `vpclattice` | 73 |
| [WAFv2](./wafv2.md) | `wafv2` | 39 |
128 changes: 64 additions & 64 deletions docs/coverage/aws/vpc.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,69 @@
<!-- Generated by `go generate ./...` (internal/coveragegen). Do not edit by hand. -->
# VPC

AWS's `networking` service · portable interface `driver.NetworkInterfaces` · [AWS index](./README.md)
AWS's `networking` service · portable interface `driver.Networking` · [AWS index](./README.md)

## Operations (3)
## Operations (57)

| Operation | Description |
| --- | --- |
| `DeleteNetworkInterface` | |
| `DescribeNetworkInterfaces` | |
| `DetachNetworkInterface` | |
| `AcceptPeeringConnection` | |
| `AddEgressRule` | |
| `AddIngressRule` | |
| `AddNetworkACLRule` | |
| `AllocateAddress` | Elastic IPs |
| `AssociateAddress` | |
| `AssociateRouteTable` | Route Table Associations |
| `AttachInternetGateway` | |
| `CreateFlowLog` | Flow Logs |
| `CreateInternetGateway` | Internet Gateways |
| `CreateNATGateway` | NAT Gateways |
| `CreateNetworkACL` | Network ACLs |
| `CreatePeeringConnection` | VPC Peering |
| `CreateRoute` | |
| `CreateRouteTable` | Route Tables |
| `CreateSecurityGroup` | |
| `CreateSubnet` | |
| `CreateVPC` | |
| `CreateVPCEndpoint` | VPC Endpoints |
| `DeleteFlowLog` | |
| `DeleteInternetGateway` | |
| `DeleteNATGateway` | |
| `DeleteNetworkACL` | |
| `DeletePeeringConnection` | |
| `DeleteRoute` | |
| `DeleteRouteTable` | |
| `DeleteSecurityGroup` | |
| `DeleteSubnet` | |
| `DeleteVPC` | |
| `DeleteVPCEndpoint` | |
| `DescribeAddresses` | |
| `DescribeFlowLogs` | |
| `DescribeInternetGateways` | |
| `DescribeNATGateways` | |
| `DescribeNetworkACLs` | |
| `DescribePeeringConnections` | |
| `DescribeRouteTables` | |
| `DescribeSecurityGroups` | |
| `DescribeSubnets` | |
| `DescribeVPCEndpoints` | |
| `DescribeVPCs` | |
| `DetachInternetGateway` | |
| `DisassociateAddress` | |
| `DisassociateRouteTable` | |
| `GetFlowLogRecords` | |
| `ModifyVPCEndpoint` | |
| `RejectPeeringConnection` | |
| `ReleaseAddress` | |
| `RemoveEgressRule` | |
| `RemoveIngressRule` | |
| `RemoveNetworkACLRule` | |
| `RemoveSecurityGroupTags` | |
| `RemoveSubnetTags` | |
| `RemoveVPCTags` | |
| `UpdateSecurityGroupTags` | |
| `UpdateSubnetTags` | |
| `UpdateVPCTags` | Tag mutation. Update* merges keys into the resource's existing Tags |

## Optional capabilities

Expand Down Expand Up @@ -216,69 +270,15 @@ NetworkInterfaceCreator is the AWS-specific ENI-creation surface. It's kept
| --- | --- |
| `CreateNetworkInterface` | |

### Networking
### NetworkInterfaces

Networking is the interface that networking provider
NetworkInterfaces is an OPTIONAL capability, discovered by type assertion.

| Operation | Description |
| --- | --- |
| `AcceptPeeringConnection` | |
| `AddEgressRule` | |
| `AddIngressRule` | |
| `AddNetworkACLRule` | |
| `AllocateAddress` | Elastic IPs |
| `AssociateAddress` | |
| `AssociateRouteTable` | Route Table Associations |
| `AttachInternetGateway` | |
| `CreateFlowLog` | Flow Logs |
| `CreateInternetGateway` | Internet Gateways |
| `CreateNATGateway` | NAT Gateways |
| `CreateNetworkACL` | Network ACLs |
| `CreatePeeringConnection` | VPC Peering |
| `CreateRoute` | |
| `CreateRouteTable` | Route Tables |
| `CreateSecurityGroup` | |
| `CreateSubnet` | |
| `CreateVPC` | |
| `CreateVPCEndpoint` | VPC Endpoints |
| `DeleteFlowLog` | |
| `DeleteInternetGateway` | |
| `DeleteNATGateway` | |
| `DeleteNetworkACL` | |
| `DeletePeeringConnection` | |
| `DeleteRoute` | |
| `DeleteRouteTable` | |
| `DeleteSecurityGroup` | |
| `DeleteSubnet` | |
| `DeleteVPC` | |
| `DeleteVPCEndpoint` | |
| `DescribeAddresses` | |
| `DescribeFlowLogs` | |
| `DescribeInternetGateways` | |
| `DescribeNATGateways` | |
| `DescribeNetworkACLs` | |
| `DescribePeeringConnections` | |
| `DescribeRouteTables` | |
| `DescribeSecurityGroups` | |
| `DescribeSubnets` | |
| `DescribeVPCEndpoints` | |
| `DescribeVPCs` | |
| `DetachInternetGateway` | |
| `DisassociateAddress` | |
| `DisassociateRouteTable` | |
| `GetFlowLogRecords` | |
| `ModifyVPCEndpoint` | |
| `RejectPeeringConnection` | |
| `ReleaseAddress` | |
| `RemoveEgressRule` | |
| `RemoveIngressRule` | |
| `RemoveNetworkACLRule` | |
| `RemoveSecurityGroupTags` | |
| `RemoveSubnetTags` | |
| `RemoveVPCTags` | |
| `UpdateSecurityGroupTags` | |
| `UpdateSubnetTags` | |
| `UpdateVPCTags` | Tag mutation. Update* merges keys into the resource's existing Tags |
| `DeleteNetworkInterface` | |
| `DescribeNetworkInterfaces` | |
| `DetachNetworkInterface` | |

### PrefixLists

Expand Down
1 change: 1 addition & 0 deletions docs/coverage/azure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ Services cloudemu emulates for Azure, by native name. Back to the [cross-provide
| [QueueStorage](./queuestorage.md) | `messagequeue` | 14 |
| [Search](./search.md) | `azuresearch` | 53 |
| [TableStorage](./tablestorage.md) | `tablestorage` | 8 |
| [VNet](./vnet.md) | `networking` | 57 |
| [VirtualMachines](./virtualmachines.md) | `compute` | 37 |
Loading
Loading