Interface NodeRepository
-
public interface NodeRepositoryNode repository interface intended for use by the controller.- Author:
- mpolden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddNodes(com.yahoo.config.provision.zone.ZoneId zone, List<Node> nodes)Add 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 nodeApplicationgetApplication(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application)Get node repository's view of given applicationMap<com.yahoo.config.provision.TenantName,URI>getArchiveUris(com.yahoo.config.provision.zone.ZoneId zone)Get all archive URLs found in zoneNodegetNode(com.yahoo.config.provision.zone.ZoneId zone, String hostname)Get node from zoneNodeRepoStatsgetStats(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<Node>list(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 applicationvoidreboot(com.yahoo.config.provision.zone.ZoneId zone, String hostname)Schedule 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 stateTargetVersionstargetVersionsOf(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 Detail
-
addNodes
void addNodes(com.yahoo.config.provision.zone.ZoneId zone, List<Node> nodes)Add new nodes to the node repository
-
deleteNode
void deleteNode(com.yahoo.config.provision.zone.ZoneId zone, String hostname)Delete node
-
setState
void setState(com.yahoo.config.provision.zone.ZoneId zone, Node.State state, String hostname)Move node to given state
-
getNode
Node getNode(com.yahoo.config.provision.zone.ZoneId zone, String hostname)
Get node from zone
-
list
List<Node> list(com.yahoo.config.provision.zone.ZoneId zone, NodeFilter filter)
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
NodeRepoStats getStats(com.yahoo.config.provision.zone.ZoneId zone)
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
TargetVersions targetVersionsOf(com.yahoo.config.provision.zone.ZoneId zone)
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
void updateModel(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String modelName)Update hardware model
-
updateSwitchHostname
void updateSwitchHostname(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String switchHostname)Update switch hostname
-
reboot
void reboot(com.yahoo.config.provision.zone.ZoneId zone, String hostname)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
-
-