PlacementView#

class eclypse.placement.view.PlacementView[source]#

Bases: DiGraph

PlacementView is a snapshot of the required resources of an Infrastructure.

Methods

__init__(infrastructure)

Initializes the PlacementView.

get_edge_view(source, target)

Gets the resources required on a link.

get_node_view(node_name)

Gets the resources required on a node.

Attributes

edge_aggregate

Returns a function that aggregates the resources required on a link.

edge_assets

Alias for the edge assets of the infrastructure.

node_aggregate

Returns a function that aggregates the resources required on a node.

node_assets

Alias for the node assets of the infrastructure.

__init__(infrastructure)[source]#

Initializes the PlacementView.

Parameters:

infrastructure (Infrastructure)

get_node_view(node_name)[source]#

Gets the resources required on a node.

Parameters:

node_name (str) – The name of the node.

Returns:

The resources required on the node.

Return type:

ServiceRequirements

get_edge_view(source, target)[source]#

Gets the resources required on a link.

Parameters:
  • source (str) – The source node of the link.

  • target (str) – The target node of the link.

Returns:

The resources required on the link.

Return type:

S2SRequirements

property node_aggregate: Callable[..., dict[str, Any]]#

Returns a function that aggregates the resources required on a node.

Returns:

The function that aggregates the resources.

Return type:

Callable[…, dict[str, Any]]

property edge_aggregate: Callable[..., dict[str, Any]]#

Returns a function that aggregates the resources required on a link.

Returns:

The function that aggregates the resources.

Return type:

Callable[…, dict[str, Any]]

property node_assets: AssetBucket#

Alias for the node assets of the infrastructure.

Returns:

The node assets of the infrastructure.

Return type:

AssetBucket

property edge_assets: AssetBucket#

Alias for the edge assets of the infrastructure.

Returns:

The edge assets of the infrastructure.

Return type:

AssetBucket