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

Multiple changes:

Service component:
- fixed dependency tracking for service teardown

WebUI component:
- fixed wrong labels and values in service template
- fixed wrong labels and values in slice template
parent b9b82755
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!4Compute component:
...@@ -9,7 +9,7 @@ logging.basicConfig(level=logging.INFO, format="[%(asctime)s] %(levelname)s:%(na ...@@ -9,7 +9,7 @@ logging.basicConfig(level=logging.INFO, format="[%(asctime)s] %(levelname)s:%(na
def main(): def main():
context_uuid = 'admin' context_uuid = 'admin'
service_uuid = 'f0cbafdb-8fad-41da-b622-d9ddf5ce243d' service_uuid = 'main' #'f0cbafdb-8fad-41da-b622-d9ddf5ce243d'
service_id = ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) service_id = ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid)))
context_client = ContextClient() context_client = ContextClient()
......
...@@ -155,6 +155,7 @@ class TasksScheduler: ...@@ -155,6 +155,7 @@ class TasksScheduler:
connections = self._context_client.ListConnections(item.service_id) connections = self._context_client.ListConnections(item.service_id)
for connection in connections.connections: for connection in connections.connections:
self._add_connection_to_executor_cache(connection) self._add_connection_to_executor_cache(connection)
LOGGER.info(' PUT connection {:s}'.format(grpc_message_to_json_string(connection.connection_id)))
pending_items_to_explore.put(connection) pending_items_to_explore.put(connection)
explored_items.add(str_item_key) explored_items.add(str_item_key)
...@@ -169,6 +170,7 @@ class TasksScheduler: ...@@ -169,6 +170,7 @@ class TasksScheduler:
connections = self._context_client.ListConnections(item) connections = self._context_client.ListConnections(item)
for connection in connections.connections: for connection in connections.connections:
self._add_connection_to_executor_cache(connection) self._add_connection_to_executor_cache(connection)
LOGGER.info(' PUT connection {:s}'.format(grpc_message_to_json_string(connection.connection_id)))
pending_items_to_explore.put(connection) pending_items_to_explore.put(connection)
explored_items.add(str_item_key) explored_items.add(str_item_key)
...@@ -184,12 +186,14 @@ class TasksScheduler: ...@@ -184,12 +186,14 @@ class TasksScheduler:
#_,service_key_done = include_service(item.service_id) #_,service_key_done = include_service(item.service_id)
self._executor.get_service(item.service_id) self._executor.get_service(item.service_id)
#self._dag.add(service_key_done, connection_key) #self._dag.add(service_key_done, connection_key)
LOGGER.info(' PUT service_id {:s}'.format(grpc_message_to_json_string(item.service_id)))
pending_items_to_explore.put(item.service_id) pending_items_to_explore.put(item.service_id)
for sub_service_id in connection.sub_service_ids: for sub_service_id in item.sub_service_ids:
_,service_key_done = include_service(sub_service_id) _,service_key_done = include_service(sub_service_id)
self._executor.get_service(sub_service_id) self._executor.get_service(sub_service_id)
self._dag.add(service_key_done, connection_key) self._dag.add(service_key_done, connection_key)
LOGGER.info(' PUT sub_service_id {:s}'.format(grpc_message_to_json_string(sub_service_id)))
pending_items_to_explore.put(sub_service_id) pending_items_to_explore.put(sub_service_id)
explored_items.add(str_item_key) explored_items.add(str_item_key)
......
...@@ -201,23 +201,21 @@ ...@@ -201,23 +201,21 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for connections in connections.connections %} {% for connection in connections.connections %}
<tr> <tr>
<td> <td>
{{ connections.connection_id.connection_uuid.uuid }} {{ connection.connection_id.connection_uuid.uuid }}
</td> </td>
<td> <td>
{{ connections.sub_service_ids|map(attribute='service_uuid')|map(attribute='uuid')|join(', ') }} {{ connection.sub_service_ids|map(attribute='service_uuid')|map(attribute='uuid')|join(', ') }}
</td> </td>
{% for i in range(connections.path_hops_endpoint_ids|length) %} {% for i in range(connection.path_hops_endpoint_ids|length) %}
<td> <td>
{{ connections.path_hops_endpoint_ids[i].device_id.device_uuid.uuid }} / {{ {{ connection.path_hops_endpoint_ids[i].device_id.device_uuid.uuid }} / {{
connections.path_hops_endpoint_ids[i].endpoint_uuid.uuid }} connection.path_hops_endpoint_ids[i].endpoint_uuid.uuid }}
</td> </td>
{% endfor %} {% endfor %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
......
...@@ -177,11 +177,11 @@ ...@@ -177,11 +177,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for services in services.services %} {% for service_id in slice.slice_service_ids %}
<tr> <tr>
<td> <td>
<a href="{{ url_for('service.detail', service_uuid=services.service_id.service_uuid.uuid) }}"> <a href="{{ url_for('service.detail', service_uuid=service_id.service_uuid.uuid) }}">
{{ services.service_id.service_uuid.uuid }} {{ service_id.service_uuid.uuid }}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
...@@ -197,14 +197,20 @@ ...@@ -197,14 +197,20 @@
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th scope="col">Sub-slice</th> <th scope="col">Sub-slices</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for services in services.services %} {% for subslice_id in slice.slice_subslice_ids %}
<tr> <tr>
<td> <td>
{{ services.sub_slice_ids|map(attribute='slice_uuid')|map(attribute='uuid')|join(', ') }} <a href="{{ url_for('slice.detail', slice_uuid=subslice_id.slice_uuid.uuid) }}">
{{ subslice_id.slice_uuid.uuid }}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
......
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