Interface NodeRepository
public interface NodeRepository
Node repository interface intended for use by the controller.
- Author:
- mpolden
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd new nodes to the node repositoryvoidcancelFirmwareCheck(com.yahoo.config.provision.zone.ZoneId zone) Cancels firmware checks on all hosts in the given zone.voiddeleteNode(com.yahoo.config.provision.zone.ZoneId zone, String hostname) Delete nodegetApplication(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application) Get node repository's view of given applicationgetArchiveUris(com.yahoo.config.provision.zone.ZoneId zone) Get all archive URLs found in zoneGet node from zonegetStats(com.yahoo.config.provision.zone.ZoneId zone) Get node statistics such as cost and load from given zonebooleanisReplaceable(com.yahoo.config.provision.zone.ZoneId zone, List<com.yahoo.config.provision.HostName> hostnames) Checks whether the zone has the spare capacity to remove the given hostslist(com.yahoo.config.provision.zone.ZoneId zone, NodeFilter filter) List nodes in given zone matching given filtervoidpatchApplication(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application, double currentReadShare, double maxReadShare) Update applicationvoidSchedule reboot of given nodevoidremoveArchiveUri(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.TenantName tenantName) Remove archive URL for given tenantvoidrequestFirmwareCheck(com.yahoo.config.provision.zone.ZoneId zone) Requests firmware checks on all hosts in the given zone.voidretire(com.yahoo.config.provision.zone.ZoneId zone, String hostname, boolean wantToRetire, boolean wantToDeprovision) Retire given nodevoidsetArchiveUri(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.TenantName tenantName, URI archiveUri) Update archive URL for given tenantvoidsetState(com.yahoo.config.provision.zone.ZoneId zone, Node.State state, String hostname) Move node to given statetargetVersionsOf(com.yahoo.config.provision.zone.ZoneId zone) Get target versions for upgrades in given zonevoidupdateModel(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String modelName) Update hardware modelvoidupdateReports(com.yahoo.config.provision.zone.ZoneId zone, String hostname, Map<String, String> reports) Update reports for given node.voidupdateSwitchHostname(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String switchHostname) Update switch hostnamevoidupgrade(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.NodeType type, com.yahoo.component.Version version, boolean allowDowngrade) Upgrade all nodes of given type to a new versionvoidupgradeOs(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.NodeType type, com.yahoo.component.Version version, Duration upgradeBudget) Upgrade OS for all nodes of given type to a new version
-
Method Details
-
addNodes
Add new nodes to the node repository -
deleteNode
Delete node -
setState
Move node to given state -
getNode
Get node from zone -
list
List nodes in given zone matching given filter -
getApplication
Application getApplication(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application) Get node repository's view of given application -
patchApplication
void patchApplication(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application, double currentReadShare, double maxReadShare) Update application -
getStats
Get node statistics such as cost and load from given zone -
getArchiveUris
Map<com.yahoo.config.provision.TenantName,URI> getArchiveUris(com.yahoo.config.provision.zone.ZoneId zone) Get all archive URLs found in zone -
setArchiveUri
void setArchiveUri(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.TenantName tenantName, URI archiveUri) Update archive URL for given tenant -
removeArchiveUri
void removeArchiveUri(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.TenantName tenantName) Remove archive URL for given tenant -
upgrade
void upgrade(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.NodeType type, com.yahoo.component.Version version, boolean allowDowngrade) Upgrade all nodes of given type to a new version -
upgradeOs
void upgradeOs(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.NodeType type, com.yahoo.component.Version version, Duration upgradeBudget) Upgrade OS for all nodes of given type to a new version -
targetVersionsOf
Get target versions for upgrades in given zone -
requestFirmwareCheck
void requestFirmwareCheck(com.yahoo.config.provision.zone.ZoneId zone) Requests firmware checks on all hosts in the given zone. -
cancelFirmwareCheck
void cancelFirmwareCheck(com.yahoo.config.provision.zone.ZoneId zone) Cancels firmware checks on all hosts in the given zone. -
retire
void retire(com.yahoo.config.provision.zone.ZoneId zone, String hostname, boolean wantToRetire, boolean wantToDeprovision) Retire given node -
updateReports
void updateReports(com.yahoo.config.provision.zone.ZoneId zone, String hostname, Map<String, String> reports) Update reports for given node. A key with null value clears that report -
updateModel
Update hardware model -
updateSwitchHostname
void updateSwitchHostname(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String switchHostname) Update switch hostname -
reboot
Schedule reboot of given node -
isReplaceable
boolean isReplaceable(com.yahoo.config.provision.zone.ZoneId zone, List<com.yahoo.config.provision.HostName> hostnames) Checks whether the zone has the spare capacity to remove the given hosts
-