Skip to content

[Request]: TECH DEBT: Refactor network resource management for 1.0. #1404

@jglogan

Description

@jglogan

Feature or enhancement request details

We need to evolve our resource management in the client, API server, and plugins so that we have a maintainable codebase with good compatibility properties for 1.0.

The plan is to tackle this resource by resource, starting with Network. I've put together a checklist which will likely evolve as we work through this first resource:

  • Conformance to ManagedResource (Create ResourceLabels and use for ManagedResource, NetworkConfiguration. #1360, needs more work)
  • Client is an instance with init(servicePrefix:) that performs syntactic validation on all input (API: Rename to NetworkClient, client as instance. #1405)
  • Client create(config:) -> FooResource
  • Client list() -> [FooResource], sorted by ID
  • Client get(id:) -> FooResource
  • Client delete(id:)
  • Client defines FooResource+XPC.swift with toXPC() -> XPCMessage and fromXPC(xpcMessage:) and round trip unit tests.
  • Client defines FooService.swift protocol
  • Server defines FooServing.swift protocol with FooService.swift implementation and FooTestService.swift implementation for round trip unit tests (for ensuring full XPC compatibility as API evolves).
  • ListableResource conformance for CLI presentation in ContainerCommands
  • No use of URL where FilePath should be used

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

networkIssues and features associated with networking and DNS.nextMust-have items for current and next milestone

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions