Package com.xensource.xenapi
Class Repository
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Repository
Repository for updates
First published in 1.301.0.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents all the fields in a Repository -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
If obj is a Repository, compares XenAPI references for equality.void
forget
(Connection c) Remove the repository record from the database Minimum allowed role: pool-operator First published in 1.301.0.Remove the repository record from the database Minimum allowed role: pool-operator First published in 1.301.0.static Set<Repository>
getAll
(Connection c) Return a list of all the Repositorys known to the system.static Map<Repository,
Repository.Record> Return a map of Repository references to Repository records for all Repositorys known to the system.Get the binary_url field of the given Repository.static Set<Repository>
getByNameLabel
(Connection c, String label) Get all the Repository instances with the given label.static Repository
getByUuid
(Connection c, String uuid) Get a reference to the Repository instance with the specified UUID.Get the gpgkey_path field of the given Repository.Get the hash field of the given Repository.Get the name/description field of the given Repository.Get the name/label field of the given Repository.Get the origin field of the given Repository.Get a record containing the current state of the given Repository.Get the source_url field of the given Repository.Get the update field of the given Repository.Deprecated.since 23.18.0Get the uuid field of the given Repository.int
hashCode()
static Repository
introduce
(Connection c, String nameLabel, String nameDescription, String binaryUrl, String sourceUrl, Boolean update, String gpgkeyPath) Add the configuration for a new remote repository Minimum allowed role: pool-operator First published in 1.301.0.static Task
introduceAsync
(Connection c, String nameLabel, String nameDescription, String binaryUrl, String sourceUrl, Boolean update, String gpgkeyPath) Add the configuration for a new remote repository Minimum allowed role: pool-operator First published in 1.301.0.static Repository
introduceBundle
(Connection c, String nameLabel, String nameDescription) Add the configuration for a new bundle repository Minimum allowed role: pool-operator Experimental.static Task
introduceBundleAsync
(Connection c, String nameLabel, String nameDescription) Add the configuration for a new bundle repository Minimum allowed role: pool-operator Experimental.void
setGpgkeyPath
(Connection c, String value) Set the file name of the GPG public key of the repository Minimum allowed role: pool-operator Experimental.setGpgkeyPathAsync
(Connection c, String value) Set the file name of the GPG public key of the repository Minimum allowed role: pool-operator Experimental.void
setNameDescription
(Connection c, String description) Set the name/description field of the given Repository.void
setNameLabel
(Connection c, String label) Set the name/label field of the given Repository.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a Repository, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public Repository.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByUuid
public static Repository getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onuuid
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByNameLabel
public static Set<Repository> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onlabel
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameLabel
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameDescription
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getBinaryUrl
public String getBinaryUrl(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getSourceUrl
public String getSourceUrl(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUpdate
public Boolean getUpdate(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getHash
public String getHash(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUpToDate
@Deprecated(since="23.18.0") public Boolean getUpToDate(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Deprecated.since 23.18.0Get 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getGpgkeyPath
public String getGpgkeyPath(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getOrigin
public Types.Origin getOrigin(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the origin field of the given Repository. Minimum allowed role: read-only Experimental. First published in 24.23.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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameLabel
public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onlabel
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameDescription
public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 ondescription
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
introduce
public static Repository introduce(Connection c, String nameLabel, String nameDescription, String binaryUrl, String sourceUrl, Boolean update, String gpgkeyPath) throws Types.BadServerResponse, Types.XenAPIException, IOException Add the configuration for a new remote repository Minimum allowed role: pool-operator First published in 1.301.0.- Parameters:
c
- The connection the call is made onnameLabel
- The name of the repositorynameDescription
- The description of the repositorybinaryUrl
- Base URL of binary packages in this repositorysourceUrl
- Base URL of source packages in this repositoryupdate
- True if the repository is an update repository. This means that updateinfo.xml will be parsedgpgkeyPath
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
introduceAsync
public static Task introduceAsync(Connection c, String nameLabel, String nameDescription, String binaryUrl, String sourceUrl, Boolean update, String gpgkeyPath) throws Types.BadServerResponse, Types.XenAPIException, IOException Add the configuration for a new remote repository Minimum allowed role: pool-operator First published in 1.301.0.- Parameters:
c
- The connection the call is made onnameLabel
- The name of the repositorynameDescription
- The description of the repositorybinaryUrl
- Base URL of binary packages in this repositorysourceUrl
- Base URL of source packages in this repositoryupdate
- True if the repository is an update repository. This means that updateinfo.xml will be parsedgpgkeyPath
- The GPG public key file name- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
introduceBundle
public static Repository introduceBundle(Connection c, String nameLabel, String nameDescription) throws Types.BadServerResponse, Types.XenAPIException, IOException Add the configuration for a new bundle repository Minimum allowed role: pool-operator Experimental. First published in 24.23.0.- Parameters:
c
- The connection the call is made onnameLabel
- The name of the repositorynameDescription
- The description of the repository- Returns:
- The ref of the created repository record.
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
introduceBundleAsync
public static Task introduceBundleAsync(Connection c, String nameLabel, String nameDescription) throws Types.BadServerResponse, Types.XenAPIException, IOException Add the configuration for a new bundle repository Minimum allowed role: pool-operator Experimental. First published in 24.23.0.- Parameters:
c
- The connection the call is made onnameLabel
- The name of the repositorynameDescription
- The description of the repository- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
forget
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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
forgetAsync
public Task forgetAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setGpgkeyPath
public void setGpgkeyPath(Connection c, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setGpgkeyPathAsync
public Task setGpgkeyPathAsync(Connection c, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException 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 onvalue
- 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAll
public static Set<Repository> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllRecords
public static Map<Repository,Repository.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException 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
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-