IceGrid package¶
Module contents¶
- exception IceGrid.AccessDeniedException(lockUserId: str = '')¶
Bases:
UserException
The exception that is thrown when the registry update lock cannot be acquired.
- Parameters:
lockUserId (str)
- Return type:
None
- lockUserId¶
The id of the user holding the lock (if any).
- Type:
str
- class IceGrid.AdapterDescriptor(name: str = '', description: str = '', id: str = '', replicaGroupId: str = '', priority: str = '', registerProcess: bool = False, serverLifetime: bool = False, objects: list[ObjectDescriptor] = <factory>, allocatables: list[ObjectDescriptor] = <factory>)¶
Bases:
object
Describes an indirect object adapter.
- Parameters:
name (str)
description (str)
id (str)
replicaGroupId (str)
priority (str)
registerProcess (bool)
serverLifetime (bool)
objects (list[ObjectDescriptor])
allocatables (list[ObjectDescriptor])
- name¶
The object adapter name.
- Type:
str
- description¶
A description of this object adapter.
- Type:
str
- id¶
The adapter ID.
- Type:
str
- replicaGroupId¶
The replica group ID. It’s empty when the adapter is not part of a replica group.
- Type:
str
- priority¶
The adapter priority. Only relevant when the adapter is in a replica group.
- Type:
str
- registerProcess¶
When
true
, the object adapter registers a process object.- Type:
bool
- serverLifetime¶
When
true
, the lifetime of this object adapter is the same of the server lifetime. This information is used by the IceGrid node to figure out the server state: the server is active when all its “server lifetime” adapters are active.- Type:
bool
- objects¶
The descriptors of well-known objects.
- Type:
list[ObjectDescriptor]
- allocatables¶
The descriptors of allocatable objects
- Type:
list[ObjectDescriptor]
- class IceGrid.AdapterDynamicInfo(id: str = '', proxy: ObjectPrx | None = None)¶
Bases:
object
Dynamic information about the state of an adapter.
- Parameters:
id (str)
proxy (ObjectPrx | None)
- id¶
The id of the adapter.
- Type:
str
- class IceGrid.AdapterInfo(id: str = '', proxy: ObjectPrx | None = None, replicaGroupId: str = '')¶
Bases:
object
Information about an adapter registered with the IceGrid registry.
- Parameters:
id (str)
proxy (ObjectPrx | None)
replicaGroupId (str)
- id¶
The ID of the adapter.
- Type:
str
- replicaGroupId¶
The replica group ID of the object adapter, or empty if the adapter doesn’t belong to a replica group.
- Type:
str
- exception IceGrid.AdapterNotExistException(id: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid does not know an object adapter with the provided adapter ID.
- Parameters:
id (str)
- Return type:
None
- id¶
The adapter ID.
- Type:
str
- class IceGrid.AdapterObserver¶
Bases:
Object
,ABC
- abstractmethod adapterAdded(info: AdapterInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that a dynamically-registered adapter was added.
- Parameters:
info (AdapterInfo) – The details of the new adapter.
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 adapterInit(adpts: list[AdapterInfo], current: Current) None | Awaitable[None] ¶
Provides the initial list of dynamically registered adapters to the observer.
- Parameters:
adpts (list[AdapterInfo]) – The adapters that were dynamically registered with the registry.
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 adapterRemoved(id: str, current: Current) None | Awaitable[None] ¶
Notifies the observer that a dynamically-registered adapter was removed.
- Parameters:
id (str) – The ID of the removed adapter.
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 adapterUpdated(info: AdapterInfo, current: Current) None | Awaitable[None] ¶
- Parameters:
info (AdapterInfo) – The details of the updated adapter.
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]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.AdapterObserverPrx¶
Bases:
ObjectPrx
- adapterAdded(info: AdapterInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that a dynamically-registered adapter was added.
- Parameters:
info (AdapterInfo) – The details of the new adapter.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- adapterAddedAsync(info: AdapterInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a dynamically-registered adapter was added.
- Parameters:
info (AdapterInfo) – The details of the new adapter.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- adapterInit(adpts: Sequence[AdapterInfo], context: dict[str, str] | None = None) None ¶
Provides the initial list of dynamically registered adapters to the observer.
- Parameters:
adpts (Sequence[AdapterInfo]) – The adapters that were dynamically registered with the registry.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- adapterInitAsync(adpts: Sequence[AdapterInfo], context: dict[str, str] | None = None) Awaitable[None] ¶
Provides the initial list of dynamically registered adapters to the observer.
- Parameters:
adpts (Sequence[AdapterInfo]) – The adapters that were dynamically registered with the registry.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- adapterRemoved(id: str, context: dict[str, str] | None = None) None ¶
Notifies the observer that a dynamically-registered adapter was removed.
- Parameters:
id (str) – The ID of the removed adapter.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- adapterRemovedAsync(id: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a dynamically-registered adapter was removed.
- Parameters:
id (str) – The ID of the removed adapter.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- adapterUpdated(info: AdapterInfo, context: dict[str, str] | None = None) None ¶
- Parameters:
info (AdapterInfo) – The details of the updated adapter.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- adapterUpdatedAsync(info: AdapterInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
- Parameters:
info (AdapterInfo) – The details of the updated adapter.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) AdapterObserverPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[AdapterObserverPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) AdapterObserverPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceGrid.AdaptiveLoadBalancingPolicy(nReplicas: str = '', loadSample: str = '')¶
Bases:
LoadBalancingPolicy
The load balancing policy that returns the endpoints of the server(s) with the lowest load average.
- Parameters:
nReplicas (str)
loadSample (str)
- loadSample¶
The load sample to use for the load balancing. The allowed values for this attribute are “1”, “5” and “15”, representing respectively the load average over the past minute, the past 5 minutes and the past 15 minutes.
- Type:
str
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.Admin¶
Bases:
Object
,ABC
- 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_id
onobj
. 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) –
true
to enable the server,false
to 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
id
refers to an adapter, this sequence contains a single element. Ifid
refers 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:
Sequence[str] | Awaitable[Sequence[str]]
- 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:
Sequence[str] | Awaitable[Sequence[str]]
- 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:
Sequence[str] | Awaitable[Sequence[str]]
- 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:
Sequence[str] | Awaitable[Sequence[str]]
- 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:
Sequence[str] | Awaitable[Sequence[str]]
- 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:
str | Awaitable[str]
- 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.ProcessorSocketCount
property 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:
int | Awaitable[int]
- 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:
str | Awaitable[str]
- 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:
int | Awaitable[int]
- 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:
str
- 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:
true
if the server is enabled,false
otherwise.- Return type:
bool | Awaitable[bool]
- 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:
true
if the node ping succeeded,false
otherwise.- Return type:
bool | Awaitable[bool]
- 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:
true
if the registry ping succeeded,false
otherwise.- Return type:
bool | Awaitable[bool]
- 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.
- class IceGrid.AdminPrx¶
Bases:
ObjectPrx
- addApplication(descriptor: ApplicationDescriptor, context: dict[str, str] | None = None) None ¶
Adds an application to IceGrid.
- Parameters:
descriptor (ApplicationDescriptor) – The application descriptor.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- addApplicationAsync(descriptor: ApplicationDescriptor, context: dict[str, str] | None = None) Awaitable[None] ¶
Adds an application to IceGrid.
- Parameters:
descriptor (ApplicationDescriptor) – The application descriptor.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- addObject(obj: ObjectPrx | None, context: dict[str, str] | None = None) None ¶
Adds an object to the object registry. IceGrid gets the object type by calling
ice_id
onobj
. The object must be reachable.- Parameters:
obj (ObjectPrx | None) – A proxy to the object. This proxy is never null.
context (dict[str, str]) – The request context for the invocation.
- Raises:
DeploymentException – Thrown when the object can’t be added.
ObjectExistsException – Thrown when the object is already registered.
- Return type:
None
- addObjectAsync(obj: ObjectPrx | None, context: dict[str, str] | None = None) Awaitable[None] ¶
Adds an object to the object registry. IceGrid gets the object type by calling
ice_id
onobj
. The object must be reachable.- Parameters:
obj (ObjectPrx | None) – A proxy to the object. This proxy is never null.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- addObjectWithType(obj: ObjectPrx | None, type: str, context: dict[str, str] | None = None) 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.
context (dict[str, str]) – The request context for the invocation.
- Raises:
DeploymentException – Thrown when the application deployment failed.
ObjectExistsException – Thrown when the object is already registered.
- Return type:
None
- addObjectWithTypeAsync(obj: ObjectPrx | None, type: str, context: dict[str, str] | None = 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.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) AdminPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[AdminPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- enableServer(id: str, enabled: bool, context: dict[str, str] | None = None) 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) –
true
to enable the server,false
to disable it.context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- enableServerAsync(id: str, enabled: bool, context: dict[str, str] | None = 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) –
true
to enable the server,false
to disable it.context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- getAdapterInfo(id: str, context: dict[str, str] | None = None) list[AdapterInfo] ¶
Gets adapter information for the replica group or adapter with the given ID.
- Parameters:
id (str) – The adapter or replica group ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A sequence of AdapterInfo. If
id
refers to an adapter, this sequence contains a single element. Ifid
refers to a replica group, this sequence contains adapter information for each member of the replica group.- Return type:
list[AdapterInfo]
- Raises:
AdapterNotExistException – Thrown when the adapter or replica group doesn’t exist.
- getAdapterInfoAsync(id: str, context: dict[str, str] | None = None) Awaitable[list[AdapterInfo]] ¶
Gets adapter information for the replica group or adapter with the given ID.
- Parameters:
id (str) – The adapter or replica group ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A sequence of AdapterInfo. If
id
refers to an adapter, this sequence contains a single element. Ifid
refers to a replica group, this sequence contains adapter information for each member of the replica group.- Return type:
Awaitable[list[AdapterInfo]]
- getAllAdapterIds(context: dict[str, str] | None = None) list[str] ¶
Gets the IDs of all adapters registered with IceGrid.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The adapter IDs.
- Return type:
list[str]
- getAllAdapterIdsAsync(context: dict[str, str] | None = None) Awaitable[list[str]] ¶
Gets the IDs of all adapters registered with IceGrid.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The adapter IDs.
- Return type:
Awaitable[list[str]]
- getAllApplicationNames(context: dict[str, str] | None = None) list[str] ¶
Gets all the IceGrid applications currently registered.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The application names.
- Return type:
list[str]
- getAllApplicationNamesAsync(context: dict[str, str] | None = None) Awaitable[list[str]] ¶
Gets all the IceGrid applications currently registered.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The application names.
- Return type:
Awaitable[list[str]]
- getAllNodeNames(context: dict[str, str] | None = None) list[str] ¶
Gets the names of all IceGrid nodes currently registered.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node names.
- Return type:
list[str]
- getAllNodeNamesAsync(context: dict[str, str] | None = None) Awaitable[list[str]] ¶
Gets the names of all IceGrid nodes currently registered.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node names.
- Return type:
Awaitable[list[str]]
- getAllObjectInfos(expr: str, context: dict[str, str] | None = None) list[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.context (dict[str, str]) – The request context for the invocation.
- Returns:
All the object infos with a stringified identity matching the given expression.
- Return type:
list[ObjectInfo]
- getAllObjectInfosAsync(expr: str, context: dict[str, str] | None = None) Awaitable[list[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.context (dict[str, str]) – The request context for the invocation.
- Returns:
All the object infos with a stringified identity matching the given expression.
- Return type:
Awaitable[list[ObjectInfo]]
- getAllRegistryNames(context: dict[str, str] | None = None) list[str] ¶
Gets the names of all the IceGrid registries currently registered.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The registry names.
- Return type:
list[str]
- getAllRegistryNamesAsync(context: dict[str, str] | None = None) Awaitable[list[str]] ¶
Gets the names of all the IceGrid registries currently registered.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The registry names.
- Return type:
Awaitable[list[str]]
- getAllServerIds(context: dict[str, str] | None = None) list[str] ¶
Gets the IDs of all the servers registered with IceGrid.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The server IDs.
- Return type:
list[str]
- getAllServerIdsAsync(context: dict[str, str] | None = None) Awaitable[list[str]] ¶
Gets the IDs of all the servers registered with IceGrid.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The server IDs.
- Return type:
Awaitable[list[str]]
- getApplicationInfo(name: str, context: dict[str, str] | None = None) ApplicationInfo ¶
Gets an application descriptor.
- Parameters:
name (str) – The application name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The application descriptor.
- Return type:
- Raises:
ApplicationNotExistException – Thrown when the application doesn’t exist.
- getApplicationInfoAsync(name: str, context: dict[str, str] | None = None) Awaitable[ApplicationInfo] ¶
Gets an application descriptor.
- Parameters:
name (str) – The application name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The application descriptor.
- Return type:
Awaitable[ApplicationInfo]
- getDefaultApplicationDescriptor(context: dict[str, str] | None = None) ApplicationDescriptor ¶
Gets the default application descriptor.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The default application descriptor.
- Return type:
- Raises:
DeploymentException – Thrown when the default application descriptor is invalid or unreachable.
- getDefaultApplicationDescriptorAsync(context: dict[str, str] | None = None) Awaitable[ApplicationDescriptor] ¶
Gets the default application descriptor.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The default application descriptor.
- Return type:
Awaitable[ApplicationDescriptor]
- getNodeAdmin(name: str, context: dict[str, str] | None = None) ObjectPrx | None ¶
Gets a proxy to the admin object of an IceGrid node.
- Parameters:
name (str) – The IceGrid node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the IceGrid node’s admin object. This proxy is never null.
- Return type:
ObjectPrx | None
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- getNodeAdminAsync(name: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Gets a proxy to the admin object of an IceGrid node.
- Parameters:
name (str) – The IceGrid node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the IceGrid node’s admin object. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- getNodeHostname(name: str, context: dict[str, str] | None = None) str ¶
Get the hostname of a node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node hostname.
- Return type:
str
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- getNodeHostnameAsync(name: str, context: dict[str, str] | None = None) Awaitable[str] ¶
Get the hostname of a node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node hostname.
- Return type:
Awaitable[str]
- getNodeInfo(name: str, context: dict[str, str] | None = None) NodeInfo ¶
Gets the node information of a node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node information.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- getNodeInfoAsync(name: str, context: dict[str, str] | None = None) Awaitable[NodeInfo] ¶
Gets the node information of a node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node information.
- Return type:
Awaitable[NodeInfo]
- getNodeLoad(name: str, context: dict[str, str] | None = None) LoadInfo ¶
Gets the load averages of a node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node load information.
- Return type:
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- getNodeLoadAsync(name: str, context: dict[str, str] | None = None) Awaitable[LoadInfo] ¶
Gets the load averages of a node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The node load information.
- Return type:
Awaitable[LoadInfo]
- getNodeProcessorSocketCount(name: str, context: dict[str, str] | None = None) 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.ProcessorSocketCount
property for the node is not set.- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The number of processor sockets or 1 if the number of sockets can’t be determined.
- Return type:
int
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- getNodeProcessorSocketCountAsync(name: str, context: dict[str, str] | None = None) 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.ProcessorSocketCount
property for the node is not set.- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The number of processor sockets or 1 if the number of sockets can’t be determined.
- Return type:
Awaitable[int]
- getObjectInfo(id: Identity, context: dict[str, str] | None = None) ObjectInfo ¶
Gets the object info for the object.
- Parameters:
id (Identity) – The identity of the object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The object info.
- Return type:
- Raises:
ObjectNotRegisteredException – Thrown when the object isn’t registered with the registry.
- getObjectInfoAsync(id: Identity, context: dict[str, str] | None = None) Awaitable[ObjectInfo] ¶
Gets the object info for the object.
- Parameters:
id (Identity) – The identity of the object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The object info.
- Return type:
Awaitable[ObjectInfo]
- getObjectInfosByType(type: str, context: dict[str, str] | None = None) list[ObjectInfo] ¶
Gets the object info of all the registered objects with a given type.
- Parameters:
type (str) – The type name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The object infos.
- Return type:
list[ObjectInfo]
- getObjectInfosByTypeAsync(type: str, context: dict[str, str] | None = None) Awaitable[list[ObjectInfo]] ¶
Gets the object info of all the registered objects with a given type.
- Parameters:
type (str) – The type name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The object infos.
- Return type:
Awaitable[list[ObjectInfo]]
- getRegistryAdmin(name: str, context: dict[str, str] | None = None) ObjectPrx | None ¶
Gets a proxy to the admin object of an IceGrid registry.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the admin object of an IceGrid registry. This proxy is never null.
- Return type:
ObjectPrx | None
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
- getRegistryAdminAsync(name: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Gets a proxy to the admin object of an IceGrid registry.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the admin object of an IceGrid registry. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- getRegistryInfo(name: str, context: dict[str, str] | None = None) RegistryInfo ¶
Gets the registry information of an IceGrid registry.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The registry information.
- Return type:
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- getRegistryInfoAsync(name: str, context: dict[str, str] | None = None) Awaitable[RegistryInfo] ¶
Gets the registry information of an IceGrid registry.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The registry information.
- Return type:
Awaitable[RegistryInfo]
- getServerAdmin(id: str, context: dict[str, str] | None = None) ObjectPrx | None ¶
Gets a proxy to the admin object of a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the admin object of the server. This proxy is never null.
- Return type:
ObjectPrx | 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.
- getServerAdminAsync(id: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Gets a proxy to the admin object of a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the admin object of the server. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- getServerAdminCategory(context: dict[str, str] | None = None) 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:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The category for server admin objects.
- Return type:
str
- getServerAdminCategoryAsync(context: dict[str, str] | None = None) 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:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The category for server admin objects.
- Return type:
Awaitable[str]
- getServerInfo(id: str, context: dict[str, str] | None = None) ServerInfo ¶
Gets information about a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The server information.
- Return type:
- Raises:
ServerNotExistException – Thrown when the server doesn’t exist.
- getServerInfoAsync(id: str, context: dict[str, str] | None = None) Awaitable[ServerInfo] ¶
Gets information about a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The server information.
- Return type:
Awaitable[ServerInfo]
- getServerPid(id: str, context: dict[str, str] | None = None) int ¶
Gets the system process ID of a server. The process ID is operating system dependent.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The process ID.
- Return type:
int
- 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.
- getServerPidAsync(id: str, context: dict[str, str] | None = None) Awaitable[int] ¶
Gets the system process ID of a server. The process ID is operating system dependent.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The process ID.
- Return type:
Awaitable[int]
- getServerState(id: str, context: dict[str, str] | None = None) ServerState ¶
Gets the state of a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The server state.
- 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.
- getServerStateAsync(id: str, context: dict[str, str] | None = None) Awaitable[ServerState] ¶
Gets the state of a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The server state.
- Return type:
Awaitable[ServerState]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- instantiateServer(application: str, node: str, desc: ServerInstanceDescriptor, context: dict[str, str] | None = None) 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.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- instantiateServerAsync(application: str, node: str, desc: ServerInstanceDescriptor, context: dict[str, str] | None = 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.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- isServerEnabled(id: str, context: dict[str, str] | None = None) bool ¶
Checks if the server is enabled or disabled.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
true
if the server is enabled,false
otherwise.- Return type:
bool
- 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.
- isServerEnabledAsync(id: str, context: dict[str, str] | None = None) Awaitable[bool] ¶
Checks if the server is enabled or disabled.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
true
if the server is enabled,false
otherwise.- Return type:
Awaitable[bool]
- pingNode(name: str, context: dict[str, str] | None = None) bool ¶
Pings an IceGrid node to see if it is active.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
true
if the node ping succeeded,false
otherwise.- Return type:
bool
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
- pingNodeAsync(name: str, context: dict[str, str] | None = None) Awaitable[bool] ¶
Pings an IceGrid node to see if it is active.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
true
if the node ping succeeded,false
otherwise.- Return type:
Awaitable[bool]
- pingRegistry(name: str, context: dict[str, str] | None = None) bool ¶
Pings an IceGrid registry to see if it is active.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
true
if the registry ping succeeded,false
otherwise.- Return type:
bool
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
- pingRegistryAsync(name: str, context: dict[str, str] | None = None) Awaitable[bool] ¶
Pings an IceGrid registry to see if it is active.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
true
if the registry ping succeeded,false
otherwise.- Return type:
Awaitable[bool]
- removeAdapter(id: str, context: dict[str, str] | None = None) None ¶
Removes the adapter with the given ID.
- Parameters:
id (str) – The adapter ID.
context (dict[str, str]) – The request context for the invocation.
- Raises:
AdapterNotExistException – Thrown when the adapter doesn’t exist.
DeploymentException – Thrown when the application deployment failed.
- Return type:
None
- removeAdapterAsync(id: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Removes the adapter with the given ID.
- Parameters:
id (str) – The adapter ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- removeApplication(name: str, context: dict[str, str] | None = None) None ¶
Removes an application from IceGrid.
- Parameters:
name (str) – The application name.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- removeApplicationAsync(name: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Removes an application from IceGrid.
- Parameters:
name (str) – The application name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- removeObject(id: Identity, context: dict[str, str] | None = None) 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.
context (dict[str, str]) – The request context for the invocation.
- Raises:
DeploymentException – Thrown when the object can’t be removed.
ObjectNotRegisteredException – Thrown when the object isn’t registered with the registry.
- Return type:
None
- removeObjectAsync(id: Identity, context: dict[str, str] | None = 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.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- sendSignal(id: str, signal: str, context: dict[str, str] | None = None) None ¶
Sends a signal to a server.
- Parameters:
id (str) – The server ID.
signal (str) – The signal, for example SIGTERM or 15.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- sendSignalAsync(id: str, signal: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Sends a signal to a server.
- Parameters:
id (str) – The server ID.
signal (str) – The signal, for example SIGTERM or 15.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- shutdown(context: dict[str, str] | None = None) None ¶
Shuts down the IceGrid registry.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- shutdownAsync(context: dict[str, str] | None = None) Awaitable[None] ¶
Shuts down the IceGrid registry.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- shutdownNode(name: str, context: dict[str, str] | None = None) None ¶
Shuts down an IceGrid node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Raises:
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- Return type:
None
- shutdownNodeAsync(name: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Shuts down an IceGrid node.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- shutdownRegistry(name: str, context: dict[str, str] | None = None) None ¶
Shuts down an IceGrid registry.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Raises:
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- Return type:
None
- shutdownRegistryAsync(name: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Shuts down an IceGrid registry.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- startServer(id: str, context: dict[str, str] | None = None) None ¶
Starts a server and waits for its activation.
- Parameters:
id (str) – The server id.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- startServerAsync(id: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Starts a server and waits for its activation.
- Parameters:
id (str) – The server id.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- stopServer(id: str, context: dict[str, str] | None = None) None ¶
Stops a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- stopServerAsync(id: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Stops a server.
- Parameters:
id (str) – The server ID.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- syncApplication(descriptor: ApplicationDescriptor, context: dict[str, str] | None = None) None ¶
Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor.
- Parameters:
descriptor (ApplicationDescriptor) – The new application descriptor.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- syncApplicationAsync(descriptor: ApplicationDescriptor, context: dict[str, str] | None = None) Awaitable[None] ¶
Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor.
- Parameters:
descriptor (ApplicationDescriptor) – The new application descriptor.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- syncApplicationWithoutRestart(descriptor: ApplicationDescriptor, context: dict[str, str] | None = None) 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.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- syncApplicationWithoutRestartAsync(descriptor: ApplicationDescriptor, context: dict[str, str] | None = 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.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) AdminPrx | None ¶
Creates a new proxy from an existing proxy.
- updateApplication(descriptor: ApplicationUpdateDescriptor, context: dict[str, str] | None = None) None ¶
Updates a deployed application.
- Parameters:
descriptor (ApplicationUpdateDescriptor) – The update descriptor.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- updateApplicationAsync(descriptor: ApplicationUpdateDescriptor, context: dict[str, str] | None = None) Awaitable[None] ¶
Updates a deployed application.
- Parameters:
descriptor (ApplicationUpdateDescriptor) – The update descriptor.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- updateApplicationWithoutRestart(descriptor: ApplicationUpdateDescriptor, context: dict[str, str] | None = None) 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.
context (dict[str, str]) – The request context for the invocation.
- 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.
- Return type:
None
- updateApplicationWithoutRestartAsync(descriptor: ApplicationUpdateDescriptor, context: dict[str, str] | None = 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.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- updateObject(obj: ObjectPrx | None, context: dict[str, str] | None = None) 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.
context (dict[str, str]) – The request context for the invocation.
- Raises:
DeploymentException – Thrown when the object can’t be updated.
ObjectNotRegisteredException – Thrown when the object isn’t registered with the registry.
- Return type:
None
- updateObjectAsync(obj: ObjectPrx | None, context: dict[str, str] | None = 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.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- class IceGrid.AdminSession¶
Bases:
Session
,ABC
- abstractmethod finishUpdate(current: Current) None | Awaitable[None] ¶
Finishes updating the registry and releases the exclusive lock.
- 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]
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock.
- abstractmethod getAdmin(current: Current) AdminPrx | None | Awaitable[AdminPrx | None] ¶
Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed by the session.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the IceGrid admin object. This proxy is never null.
- Return type:
- abstractmethod getAdminCallbackTemplate(current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Gets a “template” proxy for admin callback objects. An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A template proxy. The returned proxy is null when the Admin session was established using Glacier2.
- Return type:
- abstractmethod getReplicaName(current: Current) str | Awaitable[str] ¶
Gets the name of the registry replica hosting this session.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The replica name of the registry.
- Return type:
str | Awaitable[str]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod keepAlive(current: Current) None | Awaitable[None] ¶
Keeps the session alive.
- 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 openNodeStdErr(name: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a node stderr file for reading.
- Parameters:
name (str) – The node name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod openNodeStdOut(name: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a node stdout file for reading.
- Parameters:
name (str) – The node name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- abstractmethod openRegistryStdErr(name: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a registry stderr file for reading.
- Parameters:
name (str) – The registry name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- abstractmethod openRegistryStdOut(name: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a registry stdout file for reading.
- Parameters:
name (str) – The registry name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- abstractmethod openServerLog(id: str, path: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a server log file for reading.
- Parameters:
id (str) – The server ID.
path (str) – The path of the log file. A log file can be opened only if it’s declared in the server or service deployment descriptor.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod openServerStdErr(id: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a server stderr file for reading.
- Parameters:
id (str) – The server ID.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod openServerStdOut(id: str, count: int, current: Current) FileIteratorPrx | None | Awaitable[FileIteratorPrx | None] ¶
Opens a server stdout file for reading.
- Parameters:
id (str) – The server id.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.current (Ice.Current) – The Current object for the dispatch.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]
- Raises:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- abstractmethod setObservers(registryObs: RegistryObserverPrx | None, nodeObs: NodeObserverPrx | None, appObs: ApplicationObserverPrx | None, adptObs: AdapterObserverPrx | None, objObs: ObjectObserverPrx | None, current: Current) None | Awaitable[None] ¶
Sets the observer proxies that receive notifications when the state of the registry or nodes changes.
- Parameters:
registryObs (RegistryObserverPrx | None) – The registry observer.
nodeObs (NodeObserverPrx | None) – The node observer.
appObs (ApplicationObserverPrx | None) – The application observer.
adptObs (AdapterObserverPrx | None) – The adapter observer.
objObs (ObjectObserverPrx | None) – The object observer.
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:
ObserverAlreadyRegisteredException – Thrown when an observer is already registered with this registry.
- abstractmethod setObserversByIdentity(registryObs: Identity, nodeObs: Identity, appObs: Identity, adptObs: Identity, objObs: Identity, current: Current) None | Awaitable[None] ¶
Sets the observer identities that receive notifications when the state of the registry or nodes changes. This operation should be used by clients that are using a bidirectional connection to communicate with the session.
- Parameters:
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
ObserverAlreadyRegisteredException – Thrown when an observer is already registered with this registry.
- abstractmethod startUpdate(current: Current) int | Awaitable[int] ¶
Acquires an exclusive lock to start updating the registry applications.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The current serial.
- Return type:
int | Awaitable[int]
- Raises:
AccessDeniedException – Thrown when the exclusive lock can’t be acquired. This might happen if the lock is currently acquired by another session.
- class IceGrid.AdminSessionPrx¶
Bases:
SessionPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) AdminSessionPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[AdminSessionPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- finishUpdate(context: dict[str, str] | None = None) None ¶
Finishes updating the registry and releases the exclusive lock.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Raises:
AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock.
- Return type:
None
- finishUpdateAsync(context: dict[str, str] | None = None) Awaitable[None] ¶
Finishes updating the registry and releases the exclusive lock.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- getAdmin(context: dict[str, str] | None = None) AdminPrx | None ¶
Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed by the session.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the IceGrid admin object. This proxy is never null.
- Return type:
AdminPrx | None
- getAdminAsync(context: dict[str, str] | None = None) Awaitable[AdminPrx | None] ¶
Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed by the session.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the IceGrid admin object. This proxy is never null.
- Return type:
Awaitable[AdminPrx | None]
- getAdminCallbackTemplate(context: dict[str, str] | None = None) ObjectPrx | None ¶
Gets a “template” proxy for admin callback objects. An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A template proxy. The returned proxy is null when the Admin session was established using Glacier2.
- Return type:
ObjectPrx | None
- getAdminCallbackTemplateAsync(context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Gets a “template” proxy for admin callback objects. An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A template proxy. The returned proxy is null when the Admin session was established using Glacier2.
- Return type:
Awaitable[ObjectPrx | None]
- getReplicaName(context: dict[str, str] | None = None) str ¶
Gets the name of the registry replica hosting this session.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The replica name of the registry.
- Return type:
str
- getReplicaNameAsync(context: dict[str, str] | None = None) Awaitable[str] ¶
Gets the name of the registry replica hosting this session.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The replica name of the registry.
- Return type:
Awaitable[str]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- keepAlive(context: dict[str, str] | None = None) None ¶
Keeps the session alive.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- keepAliveAsync(context: dict[str, str] | None = None) Awaitable[None] ¶
Keeps the session alive.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- openNodeStdErr(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a node stderr file for reading.
- Parameters:
name (str) – The node name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- openNodeStdErrAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a node stderr file for reading.
- Parameters:
name (str) – The node name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- openNodeStdOut(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a node stdout file for reading.
- Parameters:
name (str) – The node name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- openNodeStdOutAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a node stdout file for reading.
- Parameters:
name (str) – The node name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- openRegistryStdErr(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a registry stderr file for reading.
- Parameters:
name (str) – The registry name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- openRegistryStdErrAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a registry stderr file for reading.
- Parameters:
name (str) – The registry name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- openRegistryStdOut(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a registry stdout file for reading.
- Parameters:
name (str) – The registry name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
FileNotAvailableException – Thrown when the file can’t be read.
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- openRegistryStdOutAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a registry stdout file for reading.
- Parameters:
name (str) – The registry name.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- openServerLog(id: str, path: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a server log file for reading.
- Parameters:
id (str) – The server ID.
path (str) – The path of the log file. A log file can be opened only if it’s declared in the server or service deployment descriptor.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- openServerLogAsync(id: str, path: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a server log file for reading.
- Parameters:
id (str) – The server ID.
path (str) – The path of the log file. A log file can be opened only if it’s declared in the server or service deployment descriptor.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- openServerStdErr(id: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a server stderr file for reading.
- Parameters:
id (str) – The server ID.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- openServerStdErrAsync(id: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a server stderr file for reading.
- Parameters:
id (str) – The server ID.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- openServerStdOut(id: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Opens a server stdout file for reading.
- Parameters:
id (str) – The server id.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
FileIteratorPrx | None
- Raises:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- openServerStdOutAsync(id: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Opens a server stdout file for reading.
- Parameters:
id (str) – The server id.
count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last
count
lines.context (dict[str, str]) – The request context for the invocation.
- Returns:
An iterator to read the file. This proxy is never null.
- Return type:
Awaitable[FileIteratorPrx | None]
- setObservers(registryObs: RegistryObserverPrx | None, nodeObs: NodeObserverPrx | None, appObs: ApplicationObserverPrx | None, adptObs: AdapterObserverPrx | None, objObs: ObjectObserverPrx | None, context: dict[str, str] | None = None) None ¶
Sets the observer proxies that receive notifications when the state of the registry or nodes changes.
- Parameters:
registryObs (RegistryObserverPrx | None) – The registry observer.
nodeObs (NodeObserverPrx | None) – The node observer.
appObs (ApplicationObserverPrx | None) – The application observer.
adptObs (AdapterObserverPrx | None) – The adapter observer.
objObs (ObjectObserverPrx | None) – The object observer.
context (dict[str, str]) – The request context for the invocation.
- Raises:
ObserverAlreadyRegisteredException – Thrown when an observer is already registered with this registry.
- Return type:
None
- setObserversAsync(registryObs: RegistryObserverPrx | None, nodeObs: NodeObserverPrx | None, appObs: ApplicationObserverPrx | None, adptObs: AdapterObserverPrx | None, objObs: ObjectObserverPrx | None, context: dict[str, str] | None = None) Awaitable[None] ¶
Sets the observer proxies that receive notifications when the state of the registry or nodes changes.
- Parameters:
registryObs (RegistryObserverPrx | None) – The registry observer.
nodeObs (NodeObserverPrx | None) – The node observer.
appObs (ApplicationObserverPrx | None) – The application observer.
adptObs (AdapterObserverPrx | None) – The adapter observer.
objObs (ObjectObserverPrx | None) – The object observer.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- setObserversByIdentity(registryObs: Identity, nodeObs: Identity, appObs: Identity, adptObs: Identity, objObs: Identity, context: dict[str, str] | None = None) None ¶
Sets the observer identities that receive notifications when the state of the registry or nodes changes. This operation should be used by clients that are using a bidirectional connection to communicate with the session.
- Parameters:
registryObs (Identity) – The registry observer identity.
nodeObs (Identity) – The node observer identity.
appObs (Identity) – The application observer.
adptObs (Identity) – The adapter observer.
objObs (Identity) – The object observer.
context (dict[str, str]) – The request context for the invocation.
- Raises:
ObserverAlreadyRegisteredException – Thrown when an observer is already registered with this registry.
- Return type:
None
- setObserversByIdentityAsync(registryObs: Identity, nodeObs: Identity, appObs: Identity, adptObs: Identity, objObs: Identity, context: dict[str, str] | None = None) Awaitable[None] ¶
Sets the observer identities that receive notifications when the state of the registry or nodes changes. This operation should be used by clients that are using a bidirectional connection to communicate with the session.
- Parameters:
registryObs (Identity) – The registry observer identity.
nodeObs (Identity) – The node observer identity.
appObs (Identity) – The application observer.
adptObs (Identity) – The adapter observer.
objObs (Identity) – The object observer.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- startUpdate(context: dict[str, str] | None = None) int ¶
Acquires an exclusive lock to start updating the registry applications.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The current serial.
- Return type:
int
- Raises:
AccessDeniedException – Thrown when the exclusive lock can’t be acquired. This might happen if the lock is currently acquired by another session.
- startUpdateAsync(context: dict[str, str] | None = None) Awaitable[int] ¶
Acquires an exclusive lock to start updating the registry applications.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The current serial.
- Return type:
Awaitable[int]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) AdminSessionPrx | None ¶
Creates a new proxy from an existing proxy.
- exception IceGrid.AllocationException(reason: str = '')¶
Bases:
UserException
The exception that is thrown when the allocation of an object failed.
- Parameters:
reason (str)
- Return type:
None
- reason¶
The reason why the object couldn’t be allocated.
- Type:
str
- exception IceGrid.AllocationTimeoutException(reason: str = '')¶
Bases:
AllocationException
The exception that is thrown when the request to allocate an object times out.
- Parameters:
reason (str)
- Return type:
None
- class IceGrid.ApplicationDescriptor(name: str = '', variables: dict[str, str] = <factory>, replicaGroups: list[ReplicaGroupDescriptor] = <factory>, serverTemplates: dict[str, TemplateDescriptor] = <factory>, serviceTemplates: dict[str, TemplateDescriptor] = <factory>, nodes: dict[str, NodeDescriptor] = <factory>, distrib: DistributionDescriptor = <factory>, description: str = '', propertySets: dict[str, PropertySetDescriptor] = <factory>)¶
Bases:
object
Describes an application.
- Parameters:
name (str)
variables (dict[str, str])
replicaGroups (list[ReplicaGroupDescriptor])
serverTemplates (dict[str, TemplateDescriptor])
serviceTemplates (dict[str, TemplateDescriptor])
nodes (dict[str, NodeDescriptor])
distrib (DistributionDescriptor)
description (str)
propertySets (dict[str, PropertySetDescriptor])
- name¶
The application name.
- Type:
str
- variables¶
The variables defined in the application descriptor.
- Type:
dict[str, str]
- replicaGroups¶
The replica groups.
- Type:
list[ReplicaGroupDescriptor]
- serverTemplates¶
The server templates.
- Type:
dict[str, TemplateDescriptor]
- serviceTemplates¶
The service templates.
- Type:
dict[str, TemplateDescriptor]
- nodes¶
The node descriptors.
- Type:
dict[str, NodeDescriptor]
- distrib¶
The application distribution.
- Type:
- description¶
The description of this application.
- Type:
str
- propertySets¶
Property set descriptors.
- Type:
dict[str, PropertySetDescriptor]
- class IceGrid.ApplicationInfo(uuid: str = '', createTime: int = 0, createUser: str = '', updateTime: int = 0, updateUser: str = '', revision: int = 0, descriptor: ~IceGrid.ApplicationDescriptor.ApplicationDescriptor = <factory>)¶
Bases:
object
Information about an IceGrid application.
- Parameters:
uuid (str)
createTime (int)
createUser (str)
updateTime (int)
updateUser (str)
revision (int)
descriptor (ApplicationDescriptor)
- uuid¶
Unique application identifier.
- Type:
str
- createTime¶
The creation time.
- Type:
int
- createUser¶
The user who created the application.
- Type:
str
- updateTime¶
The last update time.
- Type:
int
- updateUser¶
The user who updated the application.
- Type:
str
- revision¶
The application revision number.
- Type:
int
- descriptor¶
The application descriptor.
- Type:
- exception IceGrid.ApplicationNotExistException(name: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid does not know an application with the provided name.
- Parameters:
name (str)
- Return type:
None
- name¶
The name of the application.
- Type:
str
- class IceGrid.ApplicationObserver¶
Bases:
Object
,ABC
- abstractmethod applicationAdded(serial: int, desc: ApplicationInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that an application was added.
- Parameters:
serial (int) – The new serial number of the registry database.
desc (ApplicationInfo) – The descriptor of the new application.
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 applicationInit(serial: int, applications: list[ApplicationInfo], current: Current) None | Awaitable[None] ¶
Provides the initial application infos to the observer.
- Parameters:
serial (int) – The current serial number of the registry database. This serial number allows observers to make sure that their internal state is synchronized with the registry.
applications (list[ApplicationInfo]) – The applications currently registered with the registry.
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 applicationRemoved(serial: int, name: str, current: Current) None | Awaitable[None] ¶
Notifies the observer that an application was removed.
- Parameters:
serial (int) – The new serial number of the registry database.
name (str) – The name of the application that was removed.
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 applicationUpdated(serial: int, desc: ApplicationUpdateInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that an application was updated.
- Parameters:
serial (int) – The new serial number of the registry database.
desc (ApplicationUpdateInfo) – The descriptor of the update.
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]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.ApplicationObserverPrx¶
Bases:
ObjectPrx
- applicationAdded(serial: int, desc: ApplicationInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that an application was added.
- Parameters:
serial (int) – The new serial number of the registry database.
desc (ApplicationInfo) – The descriptor of the new application.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- applicationAddedAsync(serial: int, desc: ApplicationInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that an application was added.
- Parameters:
serial (int) – The new serial number of the registry database.
desc (ApplicationInfo) – The descriptor of the new application.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- applicationInit(serial: int, applications: Sequence[ApplicationInfo], context: dict[str, str] | None = None) None ¶
Provides the initial application infos to the observer.
- Parameters:
serial (int) – The current serial number of the registry database. This serial number allows observers to make sure that their internal state is synchronized with the registry.
applications (Sequence[ApplicationInfo]) – The applications currently registered with the registry.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- applicationInitAsync(serial: int, applications: Sequence[ApplicationInfo], context: dict[str, str] | None = None) Awaitable[None] ¶
Provides the initial application infos to the observer.
- Parameters:
serial (int) – The current serial number of the registry database. This serial number allows observers to make sure that their internal state is synchronized with the registry.
applications (Sequence[ApplicationInfo]) – The applications currently registered with the registry.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- applicationRemoved(serial: int, name: str, context: dict[str, str] | None = None) None ¶
Notifies the observer that an application was removed.
- Parameters:
serial (int) – The new serial number of the registry database.
name (str) – The name of the application that was removed.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- applicationRemovedAsync(serial: int, name: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that an application was removed.
- Parameters:
serial (int) – The new serial number of the registry database.
name (str) – The name of the application that was removed.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- applicationUpdated(serial: int, desc: ApplicationUpdateInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that an application was updated.
- Parameters:
serial (int) – The new serial number of the registry database.
desc (ApplicationUpdateInfo) – The descriptor of the update.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- applicationUpdatedAsync(serial: int, desc: ApplicationUpdateInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that an application was updated.
- Parameters:
serial (int) – The new serial number of the registry database.
desc (ApplicationUpdateInfo) – The descriptor of the update.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) ApplicationObserverPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[ApplicationObserverPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) ApplicationObserverPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceGrid.ApplicationUpdateDescriptor(name: str = '', description: BoxedString | None = None, distrib: BoxedDistributionDescriptor | None = None, variables: dict[str, str] = <factory>, removeVariables: list[str] = <factory>, propertySets: dict[str, PropertySetDescriptor] = <factory>, removePropertySets: list[str] = <factory>, replicaGroups: list[ReplicaGroupDescriptor] = <factory>, removeReplicaGroups: list[str] = <factory>, serverTemplates: dict[str, TemplateDescriptor] = <factory>, removeServerTemplates: list[str] = <factory>, serviceTemplates: dict[str, TemplateDescriptor] = <factory>, removeServiceTemplates: list[str] = <factory>, nodes: list[NodeUpdateDescriptor] = <factory>, removeNodes: list[str] = <factory>)¶
Bases:
object
An application update descriptor to describe the updates to apply to a deployed application.
- Parameters:
name (str)
description (BoxedString | None)
distrib (BoxedDistributionDescriptor | None)
variables (dict[str, str])
removeVariables (list[str])
propertySets (dict[str, PropertySetDescriptor])
removePropertySets (list[str])
replicaGroups (list[ReplicaGroupDescriptor])
removeReplicaGroups (list[str])
serverTemplates (dict[str, TemplateDescriptor])
removeServerTemplates (list[str])
serviceTemplates (dict[str, TemplateDescriptor])
removeServiceTemplates (list[str])
nodes (list[NodeUpdateDescriptor])
removeNodes (list[str])
- name¶
The name of the application to update.
- Type:
str
- description¶
The updated description (or null if the description wasn’t updated).
- Type:
BoxedString | None
- distrib¶
The updated distribution application descriptor.
- Type:
BoxedDistributionDescriptor | None
- variables¶
The variables to update.
- Type:
dict[str, str]
- removeVariables¶
The variables to remove.
- Type:
list[str]
- propertySets¶
The property sets to update.
- Type:
dict[str, PropertySetDescriptor]
- removePropertySets¶
The property sets to remove.
- Type:
list[str]
- replicaGroups¶
The replica groups to update.
- Type:
list[ReplicaGroupDescriptor]
- removeReplicaGroups¶
The replica groups to remove.
- Type:
list[str]
- serverTemplates¶
The server templates to update.
- Type:
dict[str, TemplateDescriptor]
- removeServerTemplates¶
The IDs of the server template to remove.
- Type:
list[str]
- serviceTemplates¶
The service templates to update.
- Type:
dict[str, TemplateDescriptor]
- removeServiceTemplates¶
The IDs of the service template to remove.
- Type:
list[str]
- nodes¶
The application nodes to update.
- Type:
list[NodeUpdateDescriptor]
- removeNodes¶
The nodes to remove.
- Type:
list[str]
- class IceGrid.ApplicationUpdateInfo(updateTime: int = 0, updateUser: str = '', revision: int = 0, descriptor: ~IceGrid.ApplicationUpdateDescriptor.ApplicationUpdateDescriptor = <factory>)¶
Bases:
object
Information about updates to an IceGrid application.
- Parameters:
updateTime (int)
updateUser (str)
revision (int)
descriptor (ApplicationUpdateDescriptor)
- updateTime¶
The update time.
- Type:
int
- updateUser¶
The user who updated the application.
- Type:
str
- revision¶
The application revision number.
- Type:
int
- descriptor¶
The update descriptor.
- exception IceGrid.BadSignalException(reason: str = '')¶
Bases:
UserException
The exception that is thrown when an unknown signal is sent to a server.
- Parameters:
reason (str)
- Return type:
None
- reason¶
The details of the unknown signal.
- Type:
str
- class IceGrid.BoxedDistributionDescriptor(value: ~IceGrid.DistributionDescriptor.DistributionDescriptor = <factory>)¶
Bases:
Value
A “boxed” distribution descriptor.
- Parameters:
value (DistributionDescriptor)
- value¶
The value of the boxed distribution descriptor.
- Type:
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.BoxedString(value: str = '')¶
Bases:
Value
A “boxed” string.
- Parameters:
value (str)
- value¶
The value of the boxed string.
- Type:
str
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.CommunicatorDescriptor(adapters: list[AdapterDescriptor] = <factory>, propertySet: PropertySetDescriptor = <factory>, logs: list[str] = <factory>, description: str = '')¶
Bases:
Value
Describes an Ice communicator.
- Parameters:
adapters (list[AdapterDescriptor])
propertySet (PropertySetDescriptor)
logs (list[str])
description (str)
- adapters¶
The indirect object adapters.
- Type:
list[AdapterDescriptor]
- propertySet¶
The property set.
- Type:
- logs¶
The path of each log file.
- Type:
list[str]
- description¶
A description of this descriptor.
- Type:
str
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- exception IceGrid.DeploymentException(reason: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid cannot deploy a server.
- Parameters:
reason (str)
- Return type:
None
- reason¶
The reason for the failure.
- Type:
str
- class IceGrid.DistributionDescriptor(icepatch: str = '', directories: list[str] = <factory>)¶
Bases:
object
Describes a distribution.
- Parameters:
icepatch (str)
directories (list[str])
- icepatch¶
The proxy of the IcePatch2 server.
- Type:
str
- directories¶
The source directories.
- Type:
list[str]
- class IceGrid.FileIterator¶
Bases:
Object
,ABC
- abstractmethod destroy(current: Current) None | Awaitable[None] ¶
Destroys the iterator.
- 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]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod read(size: int, current: Current) tuple[bool, Sequence[str]] | Awaitable[tuple[bool, Sequence[str]]] ¶
Read lines from the log file.
- Parameters:
size (int) – Specifies the maximum number of bytes to be received. The server will ensure that the returned message doesn’t exceed the given size.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
- A tuple containing:
bool
true
if EOF is encountered.Sequence[str] The lines read from the file. If there was nothing to read from the file since the last call to read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no newline character should be added when writing the last line to the to the output device).
- Return type:
tuple[bool, Sequence[str]] | Awaitable[tuple[bool, Sequence[str]]]
- Raises:
FileNotAvailableException – Thrown when the implementation failed to read from the file.
- class IceGrid.FileIteratorPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) FileIteratorPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- destroy(context: dict[str, str] | None = None) None ¶
Destroys the iterator.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- destroyAsync(context: dict[str, str] | None = None) Awaitable[None] ¶
Destroys the iterator.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- read(size: int, context: dict[str, str] | None = None) tuple[bool, list[str]] ¶
Read lines from the log file.
- Parameters:
size (int) – Specifies the maximum number of bytes to be received. The server will ensure that the returned message doesn’t exceed the given size.
context (dict[str, str]) – The request context for the invocation.
- Returns:
- A tuple containing:
bool
true
if EOF is encountered.list[str] The lines read from the file. If there was nothing to read from the file since the last call to read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no newline character should be added when writing the last line to the to the output device).
- Return type:
tuple[bool, list[str]]
- Raises:
FileNotAvailableException – Thrown when the implementation failed to read from the file.
- readAsync(size: int, context: dict[str, str] | None = None) Awaitable[tuple[bool, list[str]]] ¶
Read lines from the log file.
- Parameters:
size (int) – Specifies the maximum number of bytes to be received. The server will ensure that the returned message doesn’t exceed the given size.
context (dict[str, str]) – The request context for the invocation.
- Returns:
- A tuple containing:
bool
true
if EOF is encountered.list[str] The lines read from the file. If there was nothing to read from the file since the last call to read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no newline character should be added when writing the last line to the to the output device).
- Return type:
Awaitable[tuple[bool, list[str]]]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) FileIteratorPrx | None ¶
Creates a new proxy from an existing proxy.
- exception IceGrid.FileNotAvailableException(reason: str = '')¶
Bases:
UserException
The exception that is thrown when a log file is not available.
- Parameters:
reason (str)
- Return type:
None
- reason¶
The reason for the failure.
- Type:
str
- class IceGrid.FileParser¶
Bases:
Object
,ABC
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod parse(xmlFile: str, adminProxy: AdminPrx | None, current: Current) ApplicationDescriptor | Awaitable[ApplicationDescriptor] ¶
Parses a file.
- Parameters:
xmlFile (str) – The full path to the file.
adminProxy (AdminPrx | None) – An
IceGrid.AdminPrx
proxy, used only to retrieve default templates when needed. May be null.current (Ice.Current) – The Current object for the dispatch.
- Returns:
The application descriptor.
- Return type:
ApplicationDescriptor | Awaitable[ApplicationDescriptor]
- Raises:
ParseException – Thrown when an error occurs during parsing.
- class IceGrid.FileParserPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) FileParserPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[FileParserPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- parse(xmlFile: str, adminProxy: AdminPrx | None, context: dict[str, str] | None = None) ApplicationDescriptor ¶
Parses a file.
- Parameters:
xmlFile (str) – The full path to the file.
adminProxy (AdminPrx | None) – An
IceGrid.AdminPrx
proxy, used only to retrieve default templates when needed. May be null.context (dict[str, str]) – The request context for the invocation.
- Returns:
The application descriptor.
- Return type:
- Raises:
ParseException – Thrown when an error occurs during parsing.
- parseAsync(xmlFile: str, adminProxy: AdminPrx | None, context: dict[str, str] | None = None) Awaitable[ApplicationDescriptor] ¶
Parses a file.
- Parameters:
xmlFile (str) – The full path to the file.
adminProxy (AdminPrx | None) – An
IceGrid.AdminPrx
proxy, used only to retrieve default templates when needed. May be null.context (dict[str, str]) – The request context for the invocation.
- Returns:
The application descriptor.
- Return type:
Awaitable[ApplicationDescriptor]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) FileParserPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceGrid.IceBoxDescriptor(adapters: list[AdapterDescriptor] = <factory>, propertySet: PropertySetDescriptor = <factory>, logs: list[str] = <factory>, description: str = '', id: str = '', exe: str = '', iceVersion: str = '', pwd: str = '', options: list[str] = <factory>, envs: list[str] = <factory>, activation: str = '', activationTimeout: str = '', deactivationTimeout: str = '', applicationDistrib: bool = False, distrib: DistributionDescriptor = <factory>, allocatable: bool = False, user: str = '', services: list[ServiceInstanceDescriptor] = <factory>)¶
Bases:
ServerDescriptor
Describes an IceBox server.
- Parameters:
adapters (list[AdapterDescriptor])
propertySet (PropertySetDescriptor)
logs (list[str])
description (str)
id (str)
exe (str)
iceVersion (str)
pwd (str)
options (list[str])
envs (list[str])
activation (str)
activationTimeout (str)
deactivationTimeout (str)
applicationDistrib (bool)
distrib (DistributionDescriptor)
allocatable (bool)
user (str)
services (list[ServiceInstanceDescriptor])
- services¶
The service instances.
- Type:
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.LoadBalancingPolicy(nReplicas: str = '')¶
Bases:
Value
The base class for load balancing policies.
- Parameters:
nReplicas (str)
- nReplicas¶
The number of replicas that will be used to gather the endpoints of a replica group.
- Type:
str
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.LoadInfo(avg1: float = 0.0, avg5: float = 0.0, avg15: float = 0.0)¶
Bases:
object
Information about the load of a node.
- Parameters:
avg1 (float)
avg5 (float)
avg15 (float)
- avg1¶
The load average over the past minute.
- Type:
float
- avg5¶
The load average over the past 5 minutes.
- Type:
float
- avg15¶
The load average over the past 15 minutes.
- Type:
float
- class IceGrid.LoadSample(*values)¶
Bases:
Enum
Determines which load sampling interval to use.
Enumerators:
- LoadSample1:
Sample every minute.
- LoadSample5:
Sample every five minutes.
- LoadSample15:
Sample every fifteen minutes.
- class IceGrid.Locator¶
Bases:
Locator
,ABC
- abstractmethod getLocalQuery(current: Current) QueryPrx | None | Awaitable[QueryPrx | None] ¶
Gets a proxy to the query object hosted by this IceGrid registry.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the query object. This proxy is never null.
- Return type:
- abstractmethod getLocalRegistry(current: Current) RegistryPrx | None | Awaitable[RegistryPrx | None] ¶
Gets a proxy to the registry object hosted by this IceGrid registry.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the registry object. This proxy is never null.
- Return type:
RegistryPrx | None | Awaitable[RegistryPrx | None]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.LocatorPrx¶
Bases:
LocatorPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) LocatorPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[LocatorPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- getLocalQuery(context: dict[str, str] | None = None) QueryPrx | None ¶
Gets a proxy to the query object hosted by this IceGrid registry.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the query object. This proxy is never null.
- Return type:
QueryPrx | None
- getLocalQueryAsync(context: dict[str, str] | None = None) Awaitable[QueryPrx | None] ¶
Gets a proxy to the query object hosted by this IceGrid registry.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the query object. This proxy is never null.
- Return type:
Awaitable[QueryPrx | None]
- getLocalRegistry(context: dict[str, str] | None = None) RegistryPrx | None ¶
Gets a proxy to the registry object hosted by this IceGrid registry.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the registry object. This proxy is never null.
- Return type:
RegistryPrx | None
- getLocalRegistryAsync(context: dict[str, str] | None = None) Awaitable[RegistryPrx | None] ¶
Gets a proxy to the registry object hosted by this IceGrid registry.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the registry object. This proxy is never null.
- Return type:
Awaitable[RegistryPrx | None]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) LocatorPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceGrid.NodeDescriptor(variables: dict[str, str] = <factory>, serverInstances: list[ServerInstanceDescriptor] = <factory>, servers: list[ServerDescriptor | None] = <factory>, loadFactor: str = '', description: str = '', propertySets: dict[str, PropertySetDescriptor] = <factory>)¶
Bases:
object
Describes an IceGrid node.
- Parameters:
variables (dict[str, str])
serverInstances (list[ServerInstanceDescriptor])
servers (list[ServerDescriptor | None])
loadFactor (str)
description (str)
propertySets (dict[str, PropertySetDescriptor])
- variables¶
The variables defined for the node.
- Type:
dict[str, str]
- serverInstances¶
The server instances (template instances).
- Type:
list[ServerInstanceDescriptor]
- servers¶
Servers that are not template instances.
- Type:
list[ServerDescriptor | None]
- loadFactor¶
Load factor of the node.
- Type:
str
- description¶
The description of this node.
- Type:
str
- propertySets¶
Property set descriptors.
- Type:
dict[str, PropertySetDescriptor]
- class IceGrid.NodeDynamicInfo(info: NodeInfo = <factory>, servers: list[ServerDynamicInfo] = <factory>, adapters: list[AdapterDynamicInfo] = <factory>)¶
Bases:
object
Dynamic information about the state of a node.
- Parameters:
info (NodeInfo)
servers (list[ServerDynamicInfo])
adapters (list[AdapterDynamicInfo])
- servers¶
The dynamic information of the servers deployed on this node.
- Type:
list[ServerDynamicInfo]
- adapters¶
The dynamic information of the adapters deployed on this node.
- Type:
list[AdapterDynamicInfo]
- class IceGrid.NodeInfo(name: str = '', os: str = '', hostname: str = '', release: str = '', version: str = '', machine: str = '', nProcessors: int = 0, dataDir: str = '')¶
Bases:
object
Information about an IceGrid node.
- Parameters:
name (str)
os (str)
hostname (str)
release (str)
version (str)
machine (str)
nProcessors (int)
dataDir (str)
- name¶
The name of the node.
- Type:
str
- os¶
The operating system name.
- Type:
str
- hostname¶
The network name of the host running this node.
- Type:
str
- release¶
The operation system release level.
- Type:
str
- version¶
The operation system version.
- Type:
str
- machine¶
The machine hardware type.
- Type:
str
- nProcessors¶
The number of processor threads on the node. For example, nProcessors is 8 on a computer with a single quad-core processor and two threads per core.
- Type:
int
- dataDir¶
The path to the node data directory.
- Type:
str
- exception IceGrid.NodeNotExistException(name: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid does not know a node with the provided name.
- Parameters:
name (str)
- Return type:
None
- name¶
The node name.
- Type:
str
- class IceGrid.NodeObserver¶
Bases:
Object
,ABC
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod nodeDown(name: str, current: Current) None | Awaitable[None] ¶
Notifies the observer that a node went down.
- 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]
- abstractmethod nodeInit(nodes: list[NodeDynamicInfo], current: Current) None | Awaitable[None] ¶
Provides the initial state of the nodes to the observer.
- Parameters:
nodes (list[NodeDynamicInfo]) – The current state of the nodes.
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 nodeUp(node: NodeDynamicInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that a node came up.
- Parameters:
node (NodeDynamicInfo) – The node state.
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 updateAdapter(node: str, updatedInfo: AdapterDynamicInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that the state of an object adapter changed.
- Parameters:
node (str) – The node hosting the adapter.
updatedInfo (AdapterDynamicInfo) – The new adapter state.
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 updateServer(node: str, updatedInfo: ServerDynamicInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that the state of a server changed.
- Parameters:
node (str) – The node hosting the server.
updatedInfo (ServerDynamicInfo) – The new server state.
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]
- class IceGrid.NodeObserverPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) NodeObserverPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[NodeObserverPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- nodeDown(name: str, context: dict[str, str] | None = None) None ¶
Notifies the observer that a node went down.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- nodeDownAsync(name: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a node went down.
- Parameters:
name (str) – The node name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- nodeInit(nodes: Sequence[NodeDynamicInfo], context: dict[str, str] | None = None) None ¶
Provides the initial state of the nodes to the observer.
- Parameters:
nodes (Sequence[NodeDynamicInfo]) – The current state of the nodes.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- nodeInitAsync(nodes: Sequence[NodeDynamicInfo], context: dict[str, str] | None = None) Awaitable[None] ¶
Provides the initial state of the nodes to the observer.
- Parameters:
nodes (Sequence[NodeDynamicInfo]) – The current state of the nodes.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- nodeUp(node: NodeDynamicInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that a node came up.
- Parameters:
node (NodeDynamicInfo) – The node state.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- nodeUpAsync(node: NodeDynamicInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a node came up.
- Parameters:
node (NodeDynamicInfo) – The node state.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) NodeObserverPrx | None ¶
Creates a new proxy from an existing proxy.
- updateAdapter(node: str, updatedInfo: AdapterDynamicInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that the state of an object adapter changed.
- Parameters:
node (str) – The node hosting the adapter.
updatedInfo (AdapterDynamicInfo) – The new adapter state.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- updateAdapterAsync(node: str, updatedInfo: AdapterDynamicInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that the state of an object adapter changed.
- Parameters:
node (str) – The node hosting the adapter.
updatedInfo (AdapterDynamicInfo) – The new adapter state.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- updateServer(node: str, updatedInfo: ServerDynamicInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that the state of a server changed.
- Parameters:
node (str) – The node hosting the server.
updatedInfo (ServerDynamicInfo) – The new server state.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- updateServerAsync(node: str, updatedInfo: ServerDynamicInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that the state of a server changed.
- Parameters:
node (str) – The node hosting the server.
updatedInfo (ServerDynamicInfo) – The new server state.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- exception IceGrid.NodeUnreachableException(name: str = '', reason: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid cannot reach a node.
- Parameters:
name (str)
reason (str)
- Return type:
None
- name¶
The name of the node that is not reachable.
- Type:
str
- reason¶
The reason why the node couldn’t be reached.
- Type:
str
- class IceGrid.NodeUpdateDescriptor(name: str = '', description: BoxedString | None = None, variables: dict[str, str] = <factory>, removeVariables: list[str] = <factory>, propertySets: dict[str, PropertySetDescriptor] = <factory>, removePropertySets: list[str] = <factory>, serverInstances: list[ServerInstanceDescriptor] = <factory>, servers: list[ServerDescriptor | None] = <factory>, removeServers: list[str] = <factory>, loadFactor: BoxedString | None = None)¶
Bases:
object
Describes the updates to apply to a node in a deployed application.
- Parameters:
name (str)
description (BoxedString | None)
variables (dict[str, str])
removeVariables (list[str])
propertySets (dict[str, PropertySetDescriptor])
removePropertySets (list[str])
serverInstances (list[ServerInstanceDescriptor])
servers (list[ServerDescriptor | None])
removeServers (list[str])
loadFactor (BoxedString | None)
- name¶
The name of the node to update.
- Type:
str
- description¶
The updated description (or null if the description wasn’t updated.)
- Type:
BoxedString | None
- variables¶
The variables to update.
- Type:
dict[str, str]
- removeVariables¶
The variables to remove.
- Type:
list[str]
- propertySets¶
The property sets to update.
- Type:
dict[str, PropertySetDescriptor]
- removePropertySets¶
The property sets to remove.
- Type:
list[str]
- serverInstances¶
The server instances to update.
- Type:
list[ServerInstanceDescriptor]
- servers¶
The servers which are not template instances to update.
- Type:
list[ServerDescriptor | None]
- removeServers¶
The IDs of the servers to remove.
- Type:
list[str]
- loadFactor¶
The updated load factor of the node (or null if the load factor was not updated).
- Type:
BoxedString | None
- class IceGrid.ObjectDescriptor(id: ~Ice.Identity.Identity = <factory>, type: str = '', proxyOptions: str = '')¶
Bases:
object
Describes a well-known Ice object.
- Parameters:
id (Identity)
type (str)
proxyOptions (str)
- type¶
The object type.
- Type:
str
- proxyOptions¶
The proxy options to use when creating a proxy for this well-known object. If empty, the proxy is created with the proxy options specified on the object adapter or replica group.
- Type:
str
- exception IceGrid.ObjectExistsException(id: ~Ice.Identity.Identity = <factory>)¶
Bases:
UserException
The exception that is thrown when a well-known object is already registered.
- Parameters:
id (Identity)
- Return type:
None
- class IceGrid.ObjectInfo(proxy: ObjectPrx | None = None, type: str = '')¶
Bases:
object
Information about an Ice well-known object.
- Parameters:
proxy (ObjectPrx | None)
type (str)
- type¶
The type of the object.
- Type:
str
- exception IceGrid.ObjectNotRegisteredException(id: ~Ice.Identity.Identity = <factory>)¶
Bases:
UserException
The exception that is thrown when a well-known object is not registered.
- Parameters:
id (Identity)
- Return type:
None
- class IceGrid.ObjectObserver¶
Bases:
Object
,ABC
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod objectAdded(info: ObjectInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that a well-known object was added.
- Parameters:
info (ObjectInfo) – The details of the new object.
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 objectInit(objects: list[ObjectInfo], current: Current) None | Awaitable[None] ¶
Provides the initial list of well-known objects to the observer.
- Parameters:
objects (list[ObjectInfo]) – The well-known objects registered using
IceGrid.AdminPrx
.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 objectRemoved(id: Identity, current: Current) None | Awaitable[None] ¶
Notifies the observer that a well-known object was removed.
- Parameters:
id (Identity) – The identity of the removed object.
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 objectUpdated(info: ObjectInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that a well-known object was updated.
- Parameters:
info (ObjectInfo) – The details of the updated object.
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]
- class IceGrid.ObjectObserverPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) ObjectObserverPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[ObjectObserverPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- objectAdded(info: ObjectInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that a well-known object was added.
- Parameters:
info (ObjectInfo) – The details of the new object.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- objectAddedAsync(info: ObjectInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a well-known object was added.
- Parameters:
info (ObjectInfo) – The details of the new object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- objectInit(objects: Sequence[ObjectInfo], context: dict[str, str] | None = None) None ¶
Provides the initial list of well-known objects to the observer.
- Parameters:
objects (Sequence[ObjectInfo]) – The well-known objects registered using
IceGrid.AdminPrx
.context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- objectInitAsync(objects: Sequence[ObjectInfo], context: dict[str, str] | None = None) Awaitable[None] ¶
Provides the initial list of well-known objects to the observer.
- Parameters:
objects (Sequence[ObjectInfo]) – The well-known objects registered using
IceGrid.AdminPrx
.context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- objectRemoved(id: Identity, context: dict[str, str] | None = None) None ¶
Notifies the observer that a well-known object was removed.
- Parameters:
id (Identity) – The identity of the removed object.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- objectRemovedAsync(id: Identity, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a well-known object was removed.
- Parameters:
id (Identity) – The identity of the removed object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- objectUpdated(info: ObjectInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that a well-known object was updated.
- Parameters:
info (ObjectInfo) – The details of the updated object.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- objectUpdatedAsync(info: ObjectInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a well-known object was updated.
- Parameters:
info (ObjectInfo) – The details of the updated object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) ObjectObserverPrx | None ¶
Creates a new proxy from an existing proxy.
- exception IceGrid.ObserverAlreadyRegisteredException(id: ~Ice.Identity.Identity = <factory>)¶
Bases:
UserException
The exception that is thrown when an observer is already registered with the registry.
- Parameters:
id (Identity)
- Return type:
None
- class IceGrid.OrderedLoadBalancingPolicy(nReplicas: str = '')¶
Bases:
LoadBalancingPolicy
The load balancing policy that returns endpoints in order.
- Parameters:
nReplicas (str)
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- exception IceGrid.ParseException(reason: str = '')¶
Bases:
UserException
The exception that is thrown when an error occurs during the parsing of an IceGrid XML file.
- Parameters:
reason (str)
- Return type:
None
- reason¶
The reason for the failure.
- Type:
str
- exception IceGrid.PermissionDeniedException(reason: str = '')¶
Bases:
UserException
The exception that is thrown when a client is not allowed to create a session.
- Parameters:
reason (str)
- Return type:
None
- reason¶
The reason why permission was denied.
- Type:
str
- class IceGrid.PropertyDescriptor(name: str = '', value: str = '')¶
Bases:
object
Describes an Ice property.
- Parameters:
name (str)
value (str)
- name¶
The name of the property.
- Type:
str
- value¶
The value of the property.
- Type:
str
- class IceGrid.PropertySetDescriptor(references: list[str] = <factory>, properties: list[PropertyDescriptor] = <factory>)¶
Bases:
object
A property set descriptor.
- Parameters:
references (list[str])
properties (list[PropertyDescriptor])
- references¶
References to named property sets.
- Type:
list[str]
- properties¶
The property set properties.
- Type:
list[PropertyDescriptor]
- class IceGrid.Query¶
Bases:
Object
,ABC
- abstractmethod findAllObjectsByType(type: str, current: Current) Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]] ¶
Finds all the well-known objects with the given type.
- Parameters:
type (str) – The object type.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A list of proxies to the well-known objects with the specified type. Can be empty.
- Return type:
Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]
- abstractmethod findAllReplicas(proxy: ObjectPrx | None, current: Current) Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]] ¶
Finds all the replicas of a well-known object.
- Parameters:
proxy (ObjectPrx | None) – A proxy that identifies the well-known object.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A list of proxies to the replicas of the well-known object specified by
proxy
. Can be empty.- Return type:
Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]
- abstractmethod findObjectById(id: Identity, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Finds a well-known object by identity.
- Parameters:
id (Identity) – The identity.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the well-known object, or null if no such object is registered.
- Return type:
- abstractmethod findObjectByType(type: str, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.
- Parameters:
type (str) – The object type.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to a well-known object with the specified type, or null if no such object is registered.
- Return type:
- abstractmethod findObjectByTypeOnLeastLoadedNode(type: str, sample: LoadSample, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.
- Parameters:
type (str) – The object type.
sample (LoadSample) – The sampling interval.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the well-known object, or null if no such object is registered.
- Return type:
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.QueryPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) QueryPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[QueryPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- findAllObjectsByType(type: str, context: dict[str, str] | None = None) list[ObjectPrx | None] ¶
Finds all the well-known objects with the given type.
- Parameters:
type (str) – The object type.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A list of proxies to the well-known objects with the specified type. Can be empty.
- Return type:
list[ObjectPrx | None]
- findAllObjectsByTypeAsync(type: str, context: dict[str, str] | None = None) Awaitable[list[ObjectPrx | None]] ¶
Finds all the well-known objects with the given type.
- Parameters:
type (str) – The object type.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A list of proxies to the well-known objects with the specified type. Can be empty.
- Return type:
Awaitable[list[ObjectPrx | None]]
- findAllReplicas(proxy: ObjectPrx | None, context: dict[str, str] | None = None) list[ObjectPrx | None] ¶
Finds all the replicas of a well-known object.
- findAllReplicasAsync(proxy: ObjectPrx | None, context: dict[str, str] | None = None) Awaitable[list[ObjectPrx | None]] ¶
Finds all the replicas of a well-known object.
- Parameters:
proxy (ObjectPrx | None) – A proxy that identifies the well-known object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A list of proxies to the replicas of the well-known object specified by
proxy
. Can be empty.- Return type:
Awaitable[list[ObjectPrx | None]]
- findObjectById(id: Identity, context: dict[str, str] | None = None) ObjectPrx | None ¶
Finds a well-known object by identity.
- findObjectByIdAsync(id: Identity, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Finds a well-known object by identity.
- findObjectByType(type: str, context: dict[str, str] | None = None) ObjectPrx | None ¶
Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.
- Parameters:
type (str) – The object type.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to a well-known object with the specified type, or null if no such object is registered.
- Return type:
ObjectPrx | None
- findObjectByTypeAsync(type: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.
- Parameters:
type (str) – The object type.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to a well-known object with the specified type, or null if no such object is registered.
- Return type:
Awaitable[ObjectPrx | None]
- findObjectByTypeOnLeastLoadedNode(type: str, sample: LoadSample, context: dict[str, str] | None = None) ObjectPrx | None ¶
Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.
- Parameters:
type (str) – The object type.
sample (LoadSample) – The sampling interval.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the well-known object, or null if no such object is registered.
- Return type:
ObjectPrx | None
- findObjectByTypeOnLeastLoadedNodeAsync(type: str, sample: LoadSample, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.
- Parameters:
type (str) – The object type.
sample (LoadSample) – The sampling interval.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the well-known object, or null if no such object is registered.
- Return type:
Awaitable[ObjectPrx | None]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- class IceGrid.RandomLoadBalancingPolicy(nReplicas: str = '')¶
Bases:
LoadBalancingPolicy
The load balancing policy that returns endpoints in a random order.
- Parameters:
nReplicas (str)
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.Registry¶
Bases:
Object
,ABC
- abstractmethod createAdminSession(userId: str, password: str, current: Current) AdminSessionPrx | None | Awaitable[AdminSessionPrx | None] ¶
Creates an administrative session.
- Parameters:
userId (str) – The user ID.
password (str) – The password for the given user.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
AdminSessionPrx | None | Awaitable[AdminSessionPrx | None]
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- abstractmethod createAdminSessionFromSecureConnection(current: Current) AdminSessionPrx | None | Awaitable[AdminSessionPrx | None] ¶
Creates an administrative session from a secure connection.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
AdminSessionPrx | None | Awaitable[AdminSessionPrx | None]
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- abstractmethod createSession(userId: str, password: str, current: Current) SessionPrx | None | Awaitable[SessionPrx | None] ¶
Creates a client session.
- Parameters:
userId (str) – The user ID.
password (str) – The password for the given user.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
SessionPrx | None | Awaitable[SessionPrx | None]
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- abstractmethod createSessionFromSecureConnection(current: Current) SessionPrx | None | Awaitable[SessionPrx | None] ¶
Creates a client session from a secure connection.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
SessionPrx | None | Awaitable[SessionPrx | None]
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- abstractmethod getSessionTimeout(current: Current) int | Awaitable[int] ¶
Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to send heartbeats (using ACM) or call
IceGrid.SessionPrx.keepAlive()
(resp.IceGrid.AdminSessionPrx.keepAlive()
) to keep a session alive in the IceGrid registry.- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The session timeout (in seconds).
- Return type:
int | Awaitable[int]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.RegistryInfo(name: str = '', hostname: str = '')¶
Bases:
object
Information about an IceGrid registry replica.
- Parameters:
name (str)
hostname (str)
- name¶
The name of the registry.
- Type:
str
- hostname¶
The network name of the host running this registry.
- Type:
str
- exception IceGrid.RegistryNotExistException(name: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid does not know a registry with the provided name.
- Parameters:
name (str)
- Return type:
None
- name¶
The registry name.
- Type:
str
- class IceGrid.RegistryObserver¶
Bases:
Object
,ABC
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod registryDown(name: str, current: Current) None | Awaitable[None] ¶
Notifies the observer that a registry replica went down.
- 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]
- abstractmethod registryInit(registries: list[RegistryInfo], current: Current) None | Awaitable[None] ¶
Provides the initial state of the registries to the observer.
- Parameters:
registries (list[RegistryInfo]) – The current state of the registries.
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 registryUp(registryReplica: RegistryInfo, current: Current) None | Awaitable[None] ¶
Notifies the observer that a registry replica came up.
- Parameters:
registryReplica (RegistryInfo) – The registry state.
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]
- class IceGrid.RegistryObserverPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) RegistryObserverPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[RegistryObserverPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- registryDown(name: str, context: dict[str, str] | None = None) None ¶
Notifies the observer that a registry replica went down.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- registryDownAsync(name: str, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a registry replica went down.
- Parameters:
name (str) – The registry name.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- registryInit(registries: Sequence[RegistryInfo], context: dict[str, str] | None = None) None ¶
Provides the initial state of the registries to the observer.
- Parameters:
registries (Sequence[RegistryInfo]) – The current state of the registries.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- registryInitAsync(registries: Sequence[RegistryInfo], context: dict[str, str] | None = None) Awaitable[None] ¶
Provides the initial state of the registries to the observer.
- Parameters:
registries (Sequence[RegistryInfo]) – The current state of the registries.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- registryUp(registryReplica: RegistryInfo, context: dict[str, str] | None = None) None ¶
Notifies the observer that a registry replica came up.
- Parameters:
registryReplica (RegistryInfo) – The registry state.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- registryUpAsync(registryReplica: RegistryInfo, context: dict[str, str] | None = None) Awaitable[None] ¶
Notifies the observer that a registry replica came up.
- Parameters:
registryReplica (RegistryInfo) – The registry state.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) RegistryObserverPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceGrid.RegistryPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) RegistryPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[RegistryPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- createAdminSession(userId: str, password: str, context: dict[str, str] | None = None) AdminSessionPrx | None ¶
Creates an administrative session.
- Parameters:
userId (str) – The user ID.
password (str) – The password for the given user.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
AdminSessionPrx | None
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- createAdminSessionAsync(userId: str, password: str, context: dict[str, str] | None = None) Awaitable[AdminSessionPrx | None] ¶
Creates an administrative session.
- Parameters:
userId (str) – The user ID.
password (str) – The password for the given user.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
Awaitable[AdminSessionPrx | None]
- createAdminSessionFromSecureConnection(context: dict[str, str] | None = None) AdminSessionPrx | None ¶
Creates an administrative session from a secure connection.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
AdminSessionPrx | None
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- createAdminSessionFromSecureConnectionAsync(context: dict[str, str] | None = None) Awaitable[AdminSessionPrx | None] ¶
Creates an administrative session from a secure connection.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
Awaitable[AdminSessionPrx | None]
- createSession(userId: str, password: str, context: dict[str, str] | None = None) SessionPrx | None ¶
Creates a client session.
- Parameters:
userId (str) – The user ID.
password (str) – The password for the given user.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
SessionPrx | None
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- createSessionAsync(userId: str, password: str, context: dict[str, str] | None = None) Awaitable[SessionPrx | None] ¶
Creates a client session.
- Parameters:
userId (str) – The user ID.
password (str) – The password for the given user.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
Awaitable[SessionPrx | None]
- createSessionFromSecureConnection(context: dict[str, str] | None = None) SessionPrx | None ¶
Creates a client session from a secure connection.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
SessionPrx | None
- Raises:
PermissionDeniedException – Thrown when authentication or authorization fails.
- createSessionFromSecureConnectionAsync(context: dict[str, str] | None = None) Awaitable[SessionPrx | None] ¶
Creates a client session from a secure connection.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the newly created session. This proxy is never null.
- Return type:
Awaitable[SessionPrx | None]
- getSessionTimeout(context: dict[str, str] | None = None) int ¶
Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to send heartbeats (using ACM) or call
IceGrid.SessionPrx.keepAlive()
(resp.IceGrid.AdminSessionPrx.keepAlive()
) to keep a session alive in the IceGrid registry.- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The session timeout (in seconds).
- Return type:
int
- getSessionTimeoutAsync(context: dict[str, str] | None = None) Awaitable[int] ¶
Gets the session timeout. An Ice 3.7 or earlier client can use this value to determine how often it needs to send heartbeats (using ACM) or call
IceGrid.SessionPrx.keepAlive()
(resp.IceGrid.AdminSessionPrx.keepAlive()
) to keep a session alive in the IceGrid registry.- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The session timeout (in seconds).
- Return type:
Awaitable[int]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) RegistryPrx | None ¶
Creates a new proxy from an existing proxy.
- exception IceGrid.RegistryUnreachableException(name: str = '', reason: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid cannot reach a registry.
- Parameters:
name (str)
reason (str)
- Return type:
None
- name¶
The name of the registry that is not reachable.
- Type:
str
- reason¶
The reason why the registry couldn’t be reached.
- Type:
str
- class IceGrid.ReplicaGroupDescriptor(id: str = '', loadBalancing: LoadBalancingPolicy | None = None, proxyOptions: str = '', objects: list[ObjectDescriptor] = <factory>, description: str = '', filter: str = '')¶
Bases:
object
Describes a replica group.
- Parameters:
id (str)
loadBalancing (LoadBalancingPolicy | None)
proxyOptions (str)
objects (list[ObjectDescriptor])
description (str)
filter (str)
- id¶
The replica group ID.
- Type:
str
- loadBalancing¶
The load balancing policy.
- Type:
LoadBalancingPolicy | None
- proxyOptions¶
Default options for proxies created for the replica group.
- Type:
str
- objects¶
The descriptors for the well-known objects.
- Type:
list[ObjectDescriptor]
- description¶
The description of this replica group.
- Type:
str
- filter¶
The filter to use for this replica group.
- Type:
str
- class IceGrid.RoundRobinLoadBalancingPolicy(nReplicas: str = '')¶
Bases:
LoadBalancingPolicy
The load balancing policy that returns endpoints using round-robin.
- Parameters:
nReplicas (str)
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.ServerDescriptor(adapters: list[AdapterDescriptor] = <factory>, propertySet: PropertySetDescriptor = <factory>, logs: list[str] = <factory>, description: str = '', id: str = '', exe: str = '', iceVersion: str = '', pwd: str = '', options: list[str] = <factory>, envs: list[str] = <factory>, activation: str = '', activationTimeout: str = '', deactivationTimeout: str = '', applicationDistrib: bool = False, distrib: DistributionDescriptor = <factory>, allocatable: bool = False, user: str = '')¶
Bases:
CommunicatorDescriptor
Describes an Ice server.
- Parameters:
adapters (list[AdapterDescriptor])
propertySet (PropertySetDescriptor)
logs (list[str])
description (str)
id (str)
exe (str)
iceVersion (str)
pwd (str)
options (list[str])
envs (list[str])
activation (str)
activationTimeout (str)
deactivationTimeout (str)
applicationDistrib (bool)
distrib (DistributionDescriptor)
allocatable (bool)
user (str)
- id¶
The server ID.
- Type:
str
- exe¶
The path of the server executable.
- Type:
str
- iceVersion¶
The Ice version used by this server. This is only required if backward compatibility with servers using old Ice versions is needed (otherwise the registry assumes the server is using the same Ice version as the registry itself). For example
"3.7.5"
.- Type:
str
- pwd¶
The path to the server working directory.
- Type:
str
- options¶
The command line options to pass to the server executable.
- Type:
list[str]
- envs¶
The server environment variables.
- Type:
list[str]
- activation¶
The server activation mode. Possible values are
"on-demand"
and"manual"
.- Type:
str
- activationTimeout¶
The activation timeout. It’s an integer (in string format) that represents the number of seconds to wait for activation.
- Type:
str
- deactivationTimeout¶
The deactivation timeout. It’s an integer (in string format) that represents the number of seconds to wait for deactivation.
- Type:
str
- applicationDistrib¶
Specifies if the server depends on the application distribution.
- Type:
bool
- distrib¶
The distribution descriptor.
- Type:
- allocatable¶
Specifies if the server is allocatable.
- Type:
bool
- user¶
The user account used to run the server.
- Type:
str
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.ServerDynamicInfo(id: str = '', state: ServerState = ServerState.Inactive, pid: int = 0, enabled: bool = False)¶
Bases:
object
Dynamic information about the state of a server.
- Parameters:
id (str)
state (ServerState)
pid (int)
enabled (bool)
- id¶
The ID of the server.
- Type:
str
- state¶
The state of the server.
- Type:
- pid¶
The process ID of the server.
- Type:
int
- enabled¶
Indicates whether the server is enabled.
- Type:
bool
- class IceGrid.ServerInfo(application: str = '', uuid: str = '', revision: int = 0, node: str = '', descriptor: ServerDescriptor | None = None, sessionId: str = '')¶
Bases:
object
Information about a server managed by an IceGrid node.
- Parameters:
application (str)
uuid (str)
revision (int)
node (str)
descriptor (ServerDescriptor | None)
sessionId (str)
- application¶
The application to which this server belongs.
- Type:
str
- uuid¶
The application UUID.
- Type:
str
- revision¶
The application revision.
- Type:
int
- node¶
The IceGrid node where this server is deployed.
- Type:
str
- descriptor¶
The server descriptor.
- Type:
ServerDescriptor | None
- sessionId¶
The ID of the session which allocated the server.
- Type:
str
- class IceGrid.ServerInstanceDescriptor(template: str = '', parameterValues: dict[str, str] = <factory>, propertySet: ~IceGrid.PropertySetDescriptor.PropertySetDescriptor = <factory>, servicePropertySets: dict[str, ~IceGrid.PropertySetDescriptor.PropertySetDescriptor] = <factory>)¶
Bases:
object
Describes a template instantiation that creates a server.
- Parameters:
template (str)
parameterValues (dict[str, str])
propertySet (PropertySetDescriptor)
servicePropertySets (dict[str, PropertySetDescriptor])
- template¶
The template used by this instance. It’s never empty.
- Type:
str
- parameterValues¶
The template parameter values.
- Type:
dict[str, str]
- propertySet¶
The property set.
- Type:
- servicePropertySets¶
The services property sets. It’s only valid to set these property sets when the template is an IceBox server template.
- Type:
dict[str, PropertySetDescriptor]
- exception IceGrid.ServerNotExistException(id: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid does not know a server with the provided server ID.
- Parameters:
id (str)
- Return type:
None
- id¶
The server ID.
- Type:
str
- exception IceGrid.ServerStartException(id: str = '', reason: str = '')¶
Bases:
UserException
The exception that is thrown when a server failed to start.
- Parameters:
id (str)
reason (str)
- Return type:
None
- id¶
The server ID.
- Type:
str
- reason¶
The reason for the failure.
- Type:
str
- class IceGrid.ServerState(*values)¶
Bases:
Enum
Represents the state of a server.
Enumerators:
- Inactive:
The server is not running.
- Activating:
The server is being activated and will change to the active state when the registered server object adapters are activated or to the activation timed out state if the activation timeout expires.
- ActivationTimedOut:
The server activation timed out.
- Active:
The server is running.
- Deactivating:
The server is being deactivated.
- Destroying:
The server is being destroyed.
- Destroyed:
The server is destroyed.
- exception IceGrid.ServerStopException(id: str = '', reason: str = '')¶
Bases:
UserException
The exception that is thrown when a server failed to stop.
- Parameters:
id (str)
reason (str)
- Return type:
None
- id¶
The server ID.
- Type:
str
- reason¶
The reason for the failure.
- Type:
str
- exception IceGrid.ServerUnreachableException(name: str = '', reason: str = '')¶
Bases:
UserException
The exception that is thrown when IceGrid cannot reach a server.
- Parameters:
name (str)
reason (str)
- Return type:
None
- name¶
The id of the server that is not reachable.
- Type:
str
- reason¶
The reason why the server couldn’t be reached.
- Type:
str
- class IceGrid.ServiceDescriptor(adapters: list[AdapterDescriptor] = <factory>, propertySet: PropertySetDescriptor = <factory>, logs: list[str] = <factory>, description: str = '', name: str = '', entry: str = '')¶
Bases:
CommunicatorDescriptor
Describes an IceBox service.
- Parameters:
adapters (list[AdapterDescriptor])
propertySet (PropertySetDescriptor)
logs (list[str])
description (str)
name (str)
entry (str)
- name¶
The service name.
- Type:
str
- entry¶
The entry point of the IceBox service.
- Type:
str
- static ice_staticId() str ¶
Obtain the type ID of this Slice class or interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.ServiceInstanceDescriptor(template: str = '', parameterValues: dict[str, str] = <factory>, descriptor: ServiceDescriptor | None = None, propertySet: PropertySetDescriptor = <factory>)¶
Bases:
object
Describes an IceBox service.
- Parameters:
template (str)
parameterValues (dict[str, str])
descriptor (ServiceDescriptor | None)
propertySet (PropertySetDescriptor)
- template¶
The template used by this instance. It’s empty when this instance does not use a template.
- Type:
str
- parameterValues¶
The template parameter values.
- Type:
dict[str, str]
- descriptor¶
The service definition if the instance isn’t a template instance (i.e.: if the template attribute is empty).
- Type:
ServiceDescriptor | None
- propertySet¶
The property set.
- Type:
- class IceGrid.Session¶
Bases:
Session
,ABC
- abstractmethod allocateObjectById(id: Identity, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Allocates an object.
- Parameters:
id (Identity) – The identity of the object to allocate.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the allocated object. This proxy is never null.
- Return type:
- Raises:
AllocationException – Thrown when the allocation fails.
ObjectNotRegisteredException – Thrown when an object with the given identity is not registered with the registry.
- abstractmethod allocateObjectByType(type: str, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Allocates an object with the given type.
- Parameters:
type (str) – The type of the object.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the allocated object. This proxy is never null.
- Return type:
- Raises:
AllocationException – Thrown when the allocation fails.
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod keepAlive(current: Current) None | Awaitable[None] ¶
Keeps the session alive.
- 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 releaseObject(id: Identity, current: Current) None | Awaitable[None] ¶
Releases an object that was allocated using
IceGrid.SessionPrx.allocateObjectById()
orIceGrid.SessionPrx.allocateObjectByType()
.- Parameters:
id (Identity) – The identity of the object to release.
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:
AllocationException – Thrown when the object can’t be released. This can happen when the object is not allocatable or is not allocated by this session.
ObjectNotRegisteredException – Thrown when an object with the given identity is not registered with the registry.
- abstractmethod setAllocationTimeout(timeout: int, current: Current) None | Awaitable[None] ¶
Sets the allocation timeout. When no object is immediately available for an allocation request, the implementation of
IceGrid.SessionPrx.allocateObjectById()
andIceGrid.SessionPrx.allocateObjectByType()
waits for the duration of thistimeout
.- Parameters:
timeout (int) – The timeout in milliseconds.
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]
- class IceGrid.SessionPrx¶
Bases:
SessionPrx
- allocateObjectById(id: Identity, context: dict[str, str] | None = None) ObjectPrx | None ¶
Allocates an object.
- Parameters:
id (Identity) – The identity of the object to allocate.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the allocated object. This proxy is never null.
- Return type:
ObjectPrx | None
- Raises:
AllocationException – Thrown when the allocation fails.
ObjectNotRegisteredException – Thrown when an object with the given identity is not registered with the registry.
- allocateObjectByIdAsync(id: Identity, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Allocates an object.
- allocateObjectByType(type: str, context: dict[str, str] | None = None) ObjectPrx | None ¶
Allocates an object with the given type.
- Parameters:
type (str) – The type of the object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the allocated object. This proxy is never null.
- Return type:
ObjectPrx | None
- Raises:
AllocationException – Thrown when the allocation fails.
- allocateObjectByTypeAsync(type: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Allocates an object with the given type.
- Parameters:
type (str) – The type of the object.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the allocated object. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) SessionPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[SessionPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- keepAlive(context: dict[str, str] | None = None) None ¶
Keeps the session alive.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- keepAliveAsync(context: dict[str, str] | None = None) Awaitable[None] ¶
Keeps the session alive.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- releaseObject(id: Identity, context: dict[str, str] | None = None) None ¶
Releases an object that was allocated using
IceGrid.SessionPrx.allocateObjectById()
orIceGrid.SessionPrx.allocateObjectByType()
.- Parameters:
id (Identity) – The identity of the object to release.
context (dict[str, str]) – The request context for the invocation.
- Raises:
AllocationException – Thrown when the object can’t be released. This can happen when the object is not allocatable or is not allocated by this session.
ObjectNotRegisteredException – Thrown when an object with the given identity is not registered with the registry.
- Return type:
None
- releaseObjectAsync(id: Identity, context: dict[str, str] | None = None) Awaitable[None] ¶
Releases an object that was allocated using
IceGrid.SessionPrx.allocateObjectById()
orIceGrid.SessionPrx.allocateObjectByType()
.- Parameters:
id (Identity) – The identity of the object to release.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- setAllocationTimeout(timeout: int, context: dict[str, str] | None = None) None ¶
Sets the allocation timeout. When no object is immediately available for an allocation request, the implementation of
IceGrid.SessionPrx.allocateObjectById()
andIceGrid.SessionPrx.allocateObjectByType()
waits for the duration of thistimeout
.- Parameters:
timeout (int) – The timeout in milliseconds.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- setAllocationTimeoutAsync(timeout: int, context: dict[str, str] | None = None) Awaitable[None] ¶
Sets the allocation timeout. When no object is immediately available for an allocation request, the implementation of
IceGrid.SessionPrx.allocateObjectById()
andIceGrid.SessionPrx.allocateObjectByType()
waits for the duration of thistimeout
.- Parameters:
timeout (int) – The timeout in milliseconds.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) SessionPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceGrid.TemplateDescriptor(descriptor: CommunicatorDescriptor | None = None, parameters: list[str] = <factory>, parameterDefaults: dict[str, str] = <factory>)¶
Bases:
object
Describes a template for a server or an IceBox service.
- Parameters:
descriptor (CommunicatorDescriptor | None)
parameters (list[str])
parameterDefaults (dict[str, str])
- descriptor¶
The communicator.
- Type:
CommunicatorDescriptor | None
- parameters¶
The parameters required to instantiate the template.
- Type:
list[str]
- parameterDefaults¶
The parameters’ default values.
- Type:
dict[str, str]
- class IceGrid.UserAccountMapper¶
Bases:
Object
,ABC
- abstractmethod getUserAccount(user: str, current: Current) str | Awaitable[str] ¶
Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user account to use to run servers.
- Parameters:
user (str) – The value of the server descriptor’s
user
attribute. When this attribute is not defined, and the server’s activation mode issession
, the default value foruser
is the session identifier.current (Ice.Current) – The Current object for the dispatch.
- Returns:
The user account name.
- Return type:
str | Awaitable[str]
- Raises:
UserAccountNotFoundException – Thrown when no user account is found for the given user.
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceGrid.UserAccountMapperPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) UserAccountMapperPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[UserAccountMapperPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- getUserAccount(user: str, context: dict[str, str] | None = None) str ¶
Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user account to use to run servers.
- Parameters:
user (str) – The value of the server descriptor’s
user
attribute. When this attribute is not defined, and the server’s activation mode issession
, the default value foruser
is the session identifier.context (dict[str, str]) – The request context for the invocation.
- Returns:
The user account name.
- Return type:
str
- Raises:
UserAccountNotFoundException – Thrown when no user account is found for the given user.
- getUserAccountAsync(user: str, context: dict[str, str] | None = None) Awaitable[str] ¶
Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user account to use to run servers.
- Parameters:
user (str) – The value of the server descriptor’s
user
attribute. When this attribute is not defined, and the server’s activation mode issession
, the default value foruser
is the session identifier.context (dict[str, str]) – The request context for the invocation.
- Returns:
The user account name.
- Return type:
Awaitable[str]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) UserAccountMapperPrx | None ¶
Creates a new proxy from an existing proxy.
- exception IceGrid.UserAccountNotFoundException¶
Bases:
UserException
The exception that is thrown when a user account for a given session identifier can’t be found.
- Return type:
None