Interface NodeRepository


  • public interface NodeRepository
    Node repository interface intended for use by the controller.
    Author:
    mpolden
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addNodes​(com.yahoo.config.provision.zone.ZoneId zone, List<Node> nodes)
      Add new nodes to the node repository
      void cancelFirmwareCheck​(com.yahoo.config.provision.zone.ZoneId zone)
      Cancels firmware checks on all hosts in the given zone.
      void deleteNode​(com.yahoo.config.provision.zone.ZoneId zone, String hostname)
      Delete node
      Application getApplication​(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application)
      Get node repository's view of given application
      Map<com.yahoo.config.provision.TenantName,​URI> getArchiveUris​(com.yahoo.config.provision.zone.ZoneId zone)
      Get all archive URLs found in zone
      Node getNode​(com.yahoo.config.provision.zone.ZoneId zone, String hostname)
      Get node from zone
      NodeRepoStats getStats​(com.yahoo.config.provision.zone.ZoneId zone)
      Get node statistics such as cost and load from given zone
      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
      List<Node> list​(com.yahoo.config.provision.zone.ZoneId zone, NodeFilter filter)
      List nodes in given zone matching given filter
      void patchApplication​(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.ApplicationId application, double currentReadShare, double maxReadShare)
      Update application
      void reboot​(com.yahoo.config.provision.zone.ZoneId zone, String hostname)
      Schedule reboot of given node
      void removeArchiveUri​(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.TenantName tenantName)
      Remove archive URL for given tenant
      void requestFirmwareCheck​(com.yahoo.config.provision.zone.ZoneId zone)
      Requests firmware checks on all hosts in the given zone.
      void retire​(com.yahoo.config.provision.zone.ZoneId zone, String hostname, boolean wantToRetire, boolean wantToDeprovision)
      Retire given node
      void setArchiveUri​(com.yahoo.config.provision.zone.ZoneId zone, com.yahoo.config.provision.TenantName tenantName, URI archiveUri)
      Update archive URL for given tenant
      void setState​(com.yahoo.config.provision.zone.ZoneId zone, Node.State state, String hostname)
      Move node to given state
      TargetVersions targetVersionsOf​(com.yahoo.config.provision.zone.ZoneId zone)
      Get target versions for upgrades in given zone
      void updateModel​(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String modelName)
      Update hardware model
      void updateReports​(com.yahoo.config.provision.zone.ZoneId zone, String hostname, Map<String,​String> reports)
      Update reports for given node.
      void updateSwitchHostname​(com.yahoo.config.provision.zone.ZoneId zone, String hostname, String switchHostname)
      Update switch hostname
      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
      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
    • 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