diff --git a/src/my_tests/__main__.py b/src/my_tests/__main__.py index 78ad7e032dcb62c3db2ec1914c369d284f87e132..de4aadb192a0c10afcc6e28e3a902a4d7d41b3a2 100644 --- a/src/my_tests/__main__.py +++ b/src/my_tests/__main__.py @@ -9,7 +9,7 @@ logging.basicConfig(level=logging.INFO, format="[%(asctime)s] %(levelname)s:%(na def main(): 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))) context_client = ContextClient() diff --git a/src/service/service/task_scheduler/TaskScheduler.py b/src/service/service/task_scheduler/TaskScheduler.py index 1df13a0f469cd577f1a28ff606aaf7af76a7e5cb..a9b31569b189aeeffd71f3a0c1dcee158c661725 100644 --- a/src/service/service/task_scheduler/TaskScheduler.py +++ b/src/service/service/task_scheduler/TaskScheduler.py @@ -155,6 +155,7 @@ class TasksScheduler: connections = self._context_client.ListConnections(item.service_id) for connection in connections.connections: 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) explored_items.add(str_item_key) @@ -169,6 +170,7 @@ class TasksScheduler: connections = self._context_client.ListConnections(item) for connection in connections.connections: 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) explored_items.add(str_item_key) @@ -184,12 +186,14 @@ class TasksScheduler: #_,service_key_done = include_service(item.service_id) self._executor.get_service(item.service_id) #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) - 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) self._executor.get_service(sub_service_id) 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) explored_items.add(str_item_key) diff --git a/src/webui/service/templates/service/detail.html b/src/webui/service/templates/service/detail.html index 0fd6021ac0c8880a92c704676a77b85a53873aea..f3f2506465df81ff3761960c04ae6f6c093250fe 100644 --- a/src/webui/service/templates/service/detail.html +++ b/src/webui/service/templates/service/detail.html @@ -201,23 +201,21 @@ </tr> </thead> <tbody> - {% for connections in connections.connections %} + {% for connection in connections.connections %} <tr> <td> - {{ connections.connection_id.connection_uuid.uuid }} + {{ connection.connection_id.connection_uuid.uuid }} </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> - {% for i in range(connections.path_hops_endpoint_ids|length) %} + {% for i in range(connection.path_hops_endpoint_ids|length) %} <td> - {{ connections.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].device_id.device_uuid.uuid }} / {{ + connection.path_hops_endpoint_ids[i].endpoint_uuid.uuid }} </td> {% endfor %} - - </tr> {% endfor %} </tbody> diff --git a/src/webui/service/templates/slice/detail.html b/src/webui/service/templates/slice/detail.html index 97dfdb9d2a28023e650beae22c83ca89fe43ae1a..936b0f08fb1b7def156e11f16bf552b8d60018be 100644 --- a/src/webui/service/templates/slice/detail.html +++ b/src/webui/service/templates/slice/detail.html @@ -177,11 +177,11 @@ </tr> </thead> <tbody> - {% for services in services.services %} + {% for service_id in slice.slice_service_ids %} <tr> <td> - <a href="{{ url_for('service.detail', service_uuid=services.service_id.service_uuid.uuid) }}"> - {{ services.service_id.service_uuid.uuid }} + <a href="{{ url_for('service.detail', service_uuid=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"> <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"/> @@ -197,14 +197,20 @@ <table class="table table-striped table-hover"> <thead> <tr> - <th scope="col">Sub-slice</th> + <th scope="col">Sub-slices</th> </tr> </thead> <tbody> - {% for services in services.services %} + {% for subslice_id in slice.slice_subslice_ids %} <tr> <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> </tr> {% endfor %}