IceGrid.Admin¶
- class IceGrid.Admin¶
-
Provides administrative access to an IceGrid deployment.
Notes
The Slice compiler generated this skeleton class from Slice interface
::IceGrid::Admin.- abstractmethod addApplication(descriptor: ApplicationDescriptor, current: Current) None | Awaitable[None]¶
Adds an application to IceGrid.
- Parameters:
descriptor (ApplicationDescriptor) – The application descriptor.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod addObject(obj: ObjectPrx | None, current: Current) None | Awaitable[None]¶
Adds an object to the object registry. IceGrid gets the object type by calling
ice_idonobj. The object must be reachable.- Parameters:
obj (ObjectPrx | None) – A proxy to the object. This proxy is never null.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the object can’t be added.
ObjectExistsException – Thrown when the object is already registered.
- abstractmethod addObjectWithType(obj: ObjectPrx | None, type: str, current: Current) None | Awaitable[None]¶
Adds an object to the object registry and explicitly specifies its type.
- Parameters:
obj (ObjectPrx | None) – The object to be added to the registry. The proxy is never null.
type (str) – The type name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the application deployment failed.
ObjectExistsException – Thrown when the object is already registered.
- abstractmethod enableServer(id: str, enabled: bool, current: Current) None | Awaitable[None]¶
Enables or disables a server. A disabled server can’t be started on demand or administratively. The enable state of the server is not persistent: if the node is shut down and restarted, the server will be enabled by default.
- Parameters:
id (str) – The server ID.
enabled (bool) –
trueto enable the server,falseto disable it.current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod getAdapterInfo(id: str, current: Current) Sequence[AdapterInfo] | Awaitable[Sequence[AdapterInfo]]¶
Gets adapter information for the replica group or adapter with the given ID.
- Parameters:
id (str) – The adapter or replica group ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A sequence of AdapterInfo. If
idrefers to an adapter, this sequence contains a single element. Ifidrefers to a replica group, this sequence contains adapter information for each member of the replica group.- Return type:
Sequence[AdapterInfo] | Awaitable[Sequence[AdapterInfo]]
- Raises:
AdapterNotExistException – Thrown when the adapter or replica group doesn’t exist.
- abstractmethod getAllAdapterIds(current: Current) Sequence[str] | Awaitable[Sequence[str]]¶
Gets the IDs of all adapters registered with IceGrid.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The adapter IDs.
- Return type:
- abstractmethod getAllApplicationNames(current: Current) Sequence[str] | Awaitable[Sequence[str]]¶
Gets all the IceGrid applications currently registered.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The application names.
- Return type:
- abstractmethod getAllNodeNames(current: Current) Sequence[str] | Awaitable[Sequence[str]]¶
Gets the names of all IceGrid nodes currently registered.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The node names.
- Return type:
- abstractmethod getAllObjectInfos(expr: str, current: Current) Sequence[ObjectInfo] | Awaitable[Sequence[ObjectInfo]]¶
Gets the object info of all the registered objects whose stringified identities match the given expression.
- Parameters:
expr (str) – The expression to match against the stringified identities of registered objects. The expression may contain a trailing wildcard (
*) character.current (Ice.Current) – The Current object for the dispatch.
- Returns:
All the object infos with a stringified identity matching the given expression.
- Return type:
Sequence[ObjectInfo] | Awaitable[Sequence[ObjectInfo]]
- abstractmethod getAllRegistryNames(current: Current) Sequence[str] | Awaitable[Sequence[str]]¶
Gets the names of all the IceGrid registries currently registered.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The registry names.
- Return type:
- abstractmethod getAllServerIds(current: Current) Sequence[str] | Awaitable[Sequence[str]]¶
Gets the IDs of all the servers registered with IceGrid.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The server IDs.
- Return type:
- abstractmethod getApplicationInfo(name: str, current: Current) ApplicationInfo | Awaitable[ApplicationInfo]¶
Gets an application descriptor.
- Parameters:
name (str) – The application name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The application descriptor.
- Return type:
ApplicationInfo | Awaitable[ApplicationInfo]
- Raises:
ApplicationNotExistException – Thrown when the application doesn’t exist.
- abstractmethod getDefaultApplicationDescriptor(current: Current) ApplicationDescriptor | Awaitable[ApplicationDescriptor]¶
Gets the default application descriptor.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The default application descriptor.
- Return type:
ApplicationDescriptor | Awaitable[ApplicationDescriptor]
- Raises:
DeploymentException – Thrown when the default application descriptor is invalid or unreachable.
- abstractmethod getNodeAdmin(name: str, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]¶
Gets a proxy to the admin object of an IceGrid node.
- Parameters:
name (str) – The IceGrid node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the IceGrid node’s admin object. This proxy is never null.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod getNodeHostname(name: str, current: Current) str | Awaitable[str]¶
Get the hostname of a node.
- Parameters:
name (str) – The node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The node hostname.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod getNodeInfo(name: str, current: Current) NodeInfo | Awaitable[NodeInfo]¶
Gets the node information of a node.
- Parameters:
name (str) – The node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The node information.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod getNodeLoad(name: str, current: Current) LoadInfo | Awaitable[LoadInfo]¶
Gets the load averages of a node.
- Parameters:
name (str) – The node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The node load information.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod getNodeProcessorSocketCount(name: str, current: Current) int | Awaitable[int]¶
Gets the number of physical processor sockets in the computer where an IceGrid node is deployed. Note that this operation returns 1 on operating systems where this can’t be automatically determined and where the
IceGrid.Node.ProcessorSocketCountproperty for the node is not set.- Parameters:
name (str) – The node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The number of processor sockets or 1 if the number of sockets can’t be determined.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod getObjectInfo(id: Identity, current: Current) ObjectInfo | Awaitable[ObjectInfo]¶
Gets the object info for the object.
- Parameters:
id (Identity) – The identity of the object.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The object info.
- Return type:
ObjectInfo | Awaitable[ObjectInfo]
- Raises:
ObjectNotRegisteredException – Thrown when the object isn’t registered with the registry.
- abstractmethod getObjectInfosByType(type: str, current: Current) Sequence[ObjectInfo] | Awaitable[Sequence[ObjectInfo]]¶
Gets the object info of all the registered objects with a given type.
- Parameters:
type (str) – The type name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The object infos.
- Return type:
Sequence[ObjectInfo] | Awaitable[Sequence[ObjectInfo]]
- abstractmethod getRegistryAdmin(name: str, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]¶
Gets a proxy to the admin object of an IceGrid registry.
- Parameters:
name (str) – The registry name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the admin object of an IceGrid registry. This proxy is never null.
- Return type:
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
- abstractmethod getRegistryInfo(name: str, current: Current) RegistryInfo | Awaitable[RegistryInfo]¶
Gets the registry information of an IceGrid registry.
- Parameters:
name (str) – The registry name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The registry information.
- Return type:
RegistryInfo | Awaitable[RegistryInfo]
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- abstractmethod getServerAdmin(id: str, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]¶
Gets a proxy to the admin object of a server.
- Parameters:
id (str) – The server ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the admin object of the server. This proxy is never null.
- Return type:
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod getServerAdminCategory(current: Current) str | Awaitable[str]¶
Gets the category for server admin objects. You can manufacture a server admin proxy from the admin proxy by changing its identity: use the server ID as name and the returned category as category.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The category for server admin objects.
- Return type:
- abstractmethod getServerInfo(id: str, current: Current) ServerInfo | Awaitable[ServerInfo]¶
Gets information about a server.
- Parameters:
id (str) – The server ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The server information.
- Return type:
ServerInfo | Awaitable[ServerInfo]
- Raises:
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod getServerPid(id: str, current: Current) int | Awaitable[int]¶
Gets the system process ID of a server. The process ID is operating system dependent.
- Parameters:
id (str) – The server ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The process ID.
- Return type:
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod getServerState(id: str, current: Current) ServerState | Awaitable[ServerState]¶
Gets the state of a server.
- Parameters:
id (str) – The server ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The server state.
- Return type:
ServerState | Awaitable[ServerState]
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- static ice_staticId() str¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
- abstractmethod instantiateServer(application: str, node: str, desc: ServerInstanceDescriptor, current: Current) None | Awaitable[None]¶
Instantiates a server template.
- Parameters:
application (str) – The application name.
node (str) – The name of the node where the server will be deployed.
desc (ServerInstanceDescriptor) – The descriptor of the server instance to deploy.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
ApplicationNotExistException – Thrown when the application doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod isServerEnabled(id: str, current: Current) bool | Awaitable[bool]¶
Checks if the server is enabled or disabled.
- Parameters:
id (str) – The server ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
trueif the server is enabled,falseotherwise.- Return type:
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod pingNode(name: str, current: Current) bool | Awaitable[bool]¶
Pings an IceGrid node to see if it is active.
- Parameters:
name (str) – The node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
trueif the node ping succeeded,falseotherwise.- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
- abstractmethod pingRegistry(name: str, current: Current) bool | Awaitable[bool]¶
Pings an IceGrid registry to see if it is active.
- Parameters:
name (str) – The registry name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
trueif the registry ping succeeded,falseotherwise.- Return type:
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
- abstractmethod removeAdapter(id: str, current: Current) None | Awaitable[None]¶
Removes the adapter with the given ID.
- Parameters:
id (str) – The adapter ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AdapterNotExistException – Thrown when the adapter doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod removeApplication(name: str, current: Current) None | Awaitable[None]¶
Removes an application from IceGrid.
- Parameters:
name (str) – The application name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
ApplicationNotExistException – Thrown when the application doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod removeObject(id: Identity, current: Current) None | Awaitable[None]¶
Removes an object from the object registry. Only objects added with this interface can be removed with this operation. Objects added with deployment descriptors should be removed with the deployment mechanism.
- Parameters:
id (Identity) – The identity of the object to remove.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the object can’t be removed.
ObjectNotRegisteredException – Thrown when the object isn’t registered with the registry.
- abstractmethod sendSignal(id: str, signal: str, current: Current) None | Awaitable[None]¶
Sends a signal to a server.
- Parameters:
id (str) – The server ID.
signal (str) – The signal, for example SIGTERM or 15.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
BadSignalException – Thrown when the signal is not recognized by the target server.
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod shutdown(current: Current) None | Awaitable[None]¶
Shuts down the IceGrid registry.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- abstractmethod shutdownNode(name: str, current: Current) None | Awaitable[None]¶
Shuts down an IceGrid node.
- Parameters:
name (str) – The node name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod shutdownRegistry(name: str, current: Current) None | Awaitable[None]¶
Shuts down an IceGrid registry.
- Parameters:
name (str) – The registry name.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- abstractmethod startServer(id: str, current: Current) None | Awaitable[None]¶
Starts a server and waits for its activation.
- Parameters:
id (str) – The server id.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
ServerStartException – Thrown when the server startup failed.
- abstractmethod stopServer(id: str, current: Current) None | Awaitable[None]¶
Stops a server.
- Parameters:
id (str) – The server ID.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the deployment of the server failed.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
ServerStopException – Thrown when the server stop failed.
- abstractmethod syncApplication(descriptor: ApplicationDescriptor, current: Current) None | Awaitable[None]¶
Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor.
- Parameters:
descriptor (ApplicationDescriptor) – The new application descriptor.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
ApplicationNotExistException – Thrown when the application doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod syncApplicationWithoutRestart(descriptor: ApplicationDescriptor, current: Current) None | Awaitable[None]¶
Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor only if no server restarts are necessary for the update of the application. If some servers need to be restarted, the synchronization is rejected with a DeploymentException.
- Parameters:
descriptor (ApplicationDescriptor) – The application descriptor.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
ApplicationNotExistException – Thrown when the application doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod updateApplication(descriptor: ApplicationUpdateDescriptor, current: Current) None | Awaitable[None]¶
Updates a deployed application.
- Parameters:
descriptor (ApplicationUpdateDescriptor) – The update descriptor.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
ApplicationNotExistException – Thrown when the application doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod updateApplicationWithoutRestart(descriptor: ApplicationUpdateDescriptor, current: Current) None | Awaitable[None]¶
Updates a deployed application. This operation succeeds only when no server restarts are necessary for the update of the application. If some servers need to be restarted, the synchronization is rejected with a DeploymentException.
- Parameters:
descriptor (ApplicationUpdateDescriptor) – The update descriptor.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock or when another session is holding the lock.
ApplicationNotExistException – Thrown when the application doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- abstractmethod updateObject(obj: ObjectPrx | None, current: Current) None | Awaitable[None]¶
Updates an object in the object registry. Only objects added with this interface can be updated with this operation. Objects added with deployment descriptors should be updated with the deployment mechanism.
- Parameters:
obj (ObjectPrx | None) – A proxy to the object. This proxy is never null.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
DeploymentException – Thrown when the object can’t be updated.
ObjectNotRegisteredException – Thrown when the object isn’t registered with the registry.