kops/cloudmock
justinsb 2a9343a168 Generate revisions of NLB objects, and introduce cleanup phase
This lets us safely make changes to otherwise immutable fields, in
particular for adding security groups to NLBs created without them.

We detect the older versions, and create deletion tasks to remove
them.  These tasks can be deferred, and we expect them to be
deferred to a "prune" phase that runs after cluster apply.

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
2024-02-17 11:41:15 -05:00
..
aws Generate revisions of NLB objects, and introduce cleanup phase 2024-02-17 11:41:15 -05:00
gce Refactor: Plumb context through GCE firewallRule methods 2024-01-26 10:51:34 -05:00
openstack Allow getting a server in OpenStack mock cloud 2023-02-24 01:28:05 +01:00
scaleway/mockdns review changes 2023-06-19 11:52:40 +02:00
README.md Add an initial structure for openstack cloudmock 2020-08-05 23:13:34 -05:00

README.md

cloudmock is a mock implementation of the CloudProvider APIs.

The goal is to let us test code that interacts with the CloudProvider APIs, without creating actual resources.

While no resources are created, we maintain state so that (for example) after you call CreateVpc, a subsequent call to DescribeVpcs will return that VPC. The end-goal is that we simulate the CloudProvider APIs accurately, so that we can quickly run test-cases that might otherwise require a lot of time or money to run with real resources.

In future, we can also do fault injection etc.

Note: The APIs are very large, and most of them are not implemented. Functions that are implemented may not be implemented correctly, particularly around edge-cases (such as error handling).

Typical AWS use: c := &mockec2.MockEC2{}. MockEC2 implements the EC2 API interface ec2iface.EC2API, so can be used where otherwise you would use a real EC2 client.