sirepo.global_resources package

Resouces for simulations that are globally unique.

For example, if a port is requested that port won’t conflict with any other ports on the node.

copyright:

Copyright (c) 2023 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

class sirepo.global_resources.AllocatorBase[source]

Bases: PKDict

get(for_gui)[source]

Return the value for key if key is in the dictionary, else default.

sirepo.global_resources.for_simulation(sim_type, sid, uid=None, for_gui=True)[source]

Submodules

sirepo.global_resources.api module

Supervisor API to get global resources for a simulation.

copyright:

Copyright (c) 2023 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

class sirepo.global_resources.api.Req(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]

Bases: ReqBase

sirepo.global_resources.myapp module

Global resources for myapp (tests).

copyright:

Copyright (c) 2023 RadiaSoft LLC. All Rights Reserved.

license:

http://www.apache.org/licenses/LICENSE-2.0.html

class sirepo.global_resources.myapp.Allocator[source]

Bases: AllocatorBase