Class Repository

java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Repository

public class Repository extends XenAPIObject
Repository for updates First published in 1.301.0.
Author:
Cloud Software Group, Inc.
  • Field Details

    • ref

      protected final String ref
      The XenAPI reference (OpaqueRef) to this object.
  • Method Details

    • toWireString

      public String toWireString()
      Specified by:
      toWireString in class XenAPIObject
      Returns:
      The XenAPI reference (OpaqueRef) to this object.
    • equals

      public boolean equals(Object obj)
      If obj is a Repository, compares XenAPI references for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getRecord

      public Repository.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get a record containing the current state of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      all fields from the object
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getByUuid

      public static Repository getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get a reference to the Repository instance with the specified UUID. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      uuid - UUID of object to return
      Returns:
      reference to the object
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getByNameLabel

      public static Set<Repository> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get all the Repository instances with the given label. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      label - label of object to return
      Returns:
      references to objects with matching names
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getUuid

      public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the uuid field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getNameLabel

      public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the name/label field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getNameDescription

      public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the name/description field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getBinaryUrl

      public String getBinaryUrl(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the binary_url field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getSourceUrl

      public String getSourceUrl(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the source_url field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getUpdate

      public Boolean getUpdate(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the update field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getHash

      public String getHash(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the hash field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getUpToDate

      @Deprecated public Boolean getUpToDate(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Deprecated.
      Get the up_to_date field of the given Repository. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getGpgkeyPath

      public String getGpgkeyPath(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the gpgkey_path field of the given Repository. Minimum allowed role: read-only Experimental. First published in 22.12.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      value of the field
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setNameLabel

      public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the name/label field of the given Repository. Minimum allowed role: pool-operator First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      label - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setNameDescription

      public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the name/description field of the given Repository. Minimum allowed role: pool-operator First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      description - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • introduceAsync

      public static Task introduceAsync(Connection c, String nameLabel, String nameDescription, String binaryUrl, String sourceUrl, Boolean update, String gpgkeyPath) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Add the configuration for a new repository Minimum allowed role: pool-operator First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      nameLabel - The name of the repository
      nameDescription - The description of the repository
      binaryUrl - Base URL of binary packages in this repository
      sourceUrl - Base URL of source packages in this repository
      update - True if the repository is an update repository. This means that updateinfo.xml will be parsed
      gpgkeyPath - The GPG public key file name
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • introduce

      public static Repository introduce(Connection c, String nameLabel, String nameDescription, String binaryUrl, String sourceUrl, Boolean update, String gpgkeyPath) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Add the configuration for a new repository Minimum allowed role: pool-operator First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      nameLabel - The name of the repository
      nameDescription - The description of the repository
      binaryUrl - Base URL of binary packages in this repository
      sourceUrl - Base URL of source packages in this repository
      update - True if the repository is an update repository. This means that updateinfo.xml will be parsed
      gpgkeyPath - The GPG public key file name
      Returns:
      The ref of the created repository record.
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • forgetAsync

      public Task forgetAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Remove the repository record from the database Minimum allowed role: pool-operator First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • forget

      public void forget(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Remove the repository record from the database Minimum allowed role: pool-operator First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setGpgkeyPathAsync

      public Task setGpgkeyPathAsync(Connection c, String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the file name of the GPG public key of the repository Minimum allowed role: pool-operator Experimental. First published in 22.12.0.
      Parameters:
      c - The connection the call is made on
      value - The file name of the GPG public key of the repository
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setGpgkeyPath

      public void setGpgkeyPath(Connection c, String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the file name of the GPG public key of the repository Minimum allowed role: pool-operator Experimental. First published in 22.12.0.
      Parameters:
      c - The connection the call is made on
      value - The file name of the GPG public key of the repository
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAll

      public static Set<Repository> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Return a list of all the Repositorys known to the system. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      references to all objects
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAllRecords

      public static Map<Repository,Repository.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Return a map of Repository references to Repository records for all Repositorys known to the system. Minimum allowed role: read-only First published in 1.301.0.
      Parameters:
      c - The connection the call is made on
      Returns:
      records of all objects
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.