Two facts an HA pair reports about itself. netOrk groups service instances into one service with them (NetOrk/netork#1125).
get_dhcp_ha(): declared on DhcpServerMixin and optional (callable(getattr(...))). It returns what the DHCP server's own HA configuration says:
whether HA is on (enabled);
which peer this server is (this_server);
each peer's name, its role as the server words it (data, not a shared vocabulary), and its url where the server has one;
service, the name get_services reports for the server, so the caller can match the reading to its service.
ConfigSyncMixin.get_config_sync(): where the host pushes its configuration (peer, None for no one) and for which services, by get_services name. Sync items the driver has no service name for stay visible under unmapped. It is declaration only; a driver mixes it in and no role promises it.
Both getters raise when they could not read; neither answers "off" for "could not ask". Configuration, not state: whether a pair is in hot standby right now is not in here.
Shape reviewed against STRUCTURE.md (#37) with the #1105 session: facts in the driver, mode and warnings in netOrk, NotRequired where a future driver may not supply a field.
Version 4.11.0. This collides with #40, which also takes 4.11.0; whichever merges second moves to 4.12.0.
Tests: tests/test_dhcp_ha_config_sync.py. Full suite: 628 passed.
Two facts an HA pair reports about itself. netOrk groups service instances into one service with them (NetOrk/netork#1125).
- **`get_dhcp_ha()`**: declared on `DhcpServerMixin` and optional (`callable(getattr(...))`). It returns what the DHCP server's own HA configuration says:
- whether HA is on (`enabled`);
- which peer this server is (`this_server`);
- each peer's `name`, its `role` as the server words it (data, not a shared vocabulary), and its `url` where the server has one;
- `service`, the name `get_services` reports for the server, so the caller can match the reading to its service.
- **`ConfigSyncMixin.get_config_sync()`**: where the host pushes its configuration (`peer`, None for no one) and for which `services`, by `get_services` name. Sync items the driver has no service name for stay visible under `unmapped`. It is declaration only; a driver mixes it in and no role promises it.
Both getters raise when they could not read; neither answers "off" for "could not ask". Configuration, not state: whether a pair is in hot standby right now is not in here.
Shape reviewed against STRUCTURE.md (#37) with the #1105 session: facts in the driver, mode and warnings in netOrk, `NotRequired` where a future driver may not supply a field.
Version 4.11.0. This collides with #40, which also takes 4.11.0; whichever merges second moves to 4.12.0.
Tests: `tests/test_dhcp_ha_config_sync.py`. Full suite: 628 passed.
get_dhcp_ha (declared on DhcpServerMixin, optional) is what a DHCP
server's own HA configuration says: on or off, this server's peer name,
each peer's name, role as the server words it, and HA URL.
ConfigSyncMixin.get_config_sync is where a host pushes its configuration
and for which services, by the names get_services reports; sync items
without a service name stay visible under `unmapped`. A driver mixes it
in, no role promises it. Both raise when they could not read.
What the facts mean for a pair -- hot standby, which side to write to --
is the caller's (NetOrk/netork#1125).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two facts an HA pair reports about itself. netOrk groups service instances into one service with them (NetOrk/netork#1125).
get_dhcp_ha(): declared onDhcpServerMixinand optional (callable(getattr(...))). It returns what the DHCP server's own HA configuration says:enabled);this_server);name, itsroleas the server words it (data, not a shared vocabulary), and itsurlwhere the server has one;service, the nameget_servicesreports for the server, so the caller can match the reading to its service.ConfigSyncMixin.get_config_sync(): where the host pushes its configuration (peer, None for no one) and for whichservices, byget_servicesname. Sync items the driver has no service name for stay visible underunmapped. It is declaration only; a driver mixes it in and no role promises it.Both getters raise when they could not read; neither answers "off" for "could not ask". Configuration, not state: whether a pair is in hot standby right now is not in here.
Shape reviewed against STRUCTURE.md (#37) with the #1105 session: facts in the driver, mode and warnings in netOrk,
NotRequiredwhere a future driver may not supply a field.Version 4.11.0. This collides with #40, which also takes 4.11.0; whichever merges second moves to 4.12.0.
Tests:
tests/test_dhcp_ha_config_sync.py. Full suite: 628 passed.