Skip to content
Snippets Groups Projects
Commit b82e55e5 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Common - Tools - Object Factory:

- Added availability percentage to SLA Availability constraint
parent 65e189a7
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!64Slice Grouping
...@@ -29,9 +29,9 @@ def json_constraint_endpoint_location_gps(endpoint_id : Dict, latitude : float, ...@@ -29,9 +29,9 @@ def json_constraint_endpoint_location_gps(endpoint_id : Dict, latitude : float,
def json_constraint_endpoint_priority(endpoint_id : Dict, priority : int) -> Dict: def json_constraint_endpoint_priority(endpoint_id : Dict, priority : int) -> Dict:
return {'endpoint_priority': {'endpoint_id': endpoint_id, 'priority': priority}} return {'endpoint_priority': {'endpoint_id': endpoint_id, 'priority': priority}}
def json_constraint_sla_availability(num_disjoint_paths : int, all_active : bool) -> Dict: def json_constraint_sla_availability(num_disjoint_paths : int, all_active : bool, availability : float) -> Dict:
return {'sla_availability': { return {'sla_availability': {
'num_disjoint_paths': num_disjoint_paths, 'all_active': all_active 'num_disjoint_paths': num_disjoint_paths, 'all_active': all_active, 'availability': availability
}} }}
def json_constraint_sla_capacity(capacity_gbps : float) -> Dict: def json_constraint_sla_capacity(capacity_gbps : float) -> Dict:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment