Skip to content
Snippets Groups Projects
Commit 38f0e5aa authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

debug:

- missing imports added to slice webui router
- service names changed to slice
parent f154b297
No related branches found
No related tags found
2 merge requests!359Release TeraFlowSDN 5.0,!323Resolve "(CTTC) Fixing visual presentation issues regarding the CAMARA demo"
...@@ -12,9 +12,11 @@ ...@@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import json
from typing import Dict, Optional
import grpc import grpc
from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for
from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum, EndPointId from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum, EndPointId, SliceConfig, ConfigRule
from common.tools.context_queries.Context import get_context from common.tools.context_queries.Context import get_context
from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.EndPoint import get_endpoint_names
from common.tools.context_queries.Slice import get_slice_by_uuid from common.tools.context_queries.Slice import get_slice_by_uuid
...@@ -36,12 +38,12 @@ class ConfigRuleNotFoundError(Exception): ...@@ -36,12 +38,12 @@ class ConfigRuleNotFoundError(Exception):
... ...
def get_custom_config_rule( def get_custom_config_rule(
service_config: ServiceConfig, resource_key: str slice_config: SliceConfig, resource_key: str
) -> Optional[ConfigRule]: ) -> Optional[ConfigRule]:
""" """
Retrieve the custom config rule with the given resource_key from a ServiceConfig. Retrieve the custom config rule with the given resource_key from a ServiceConfig.
""" """
for cr in service_config.config_rules: for cr in slice_config.config_rules:
if ( if (
cr.WhichOneof("config_rule") == "custom" cr.WhichOneof("config_rule") == "custom"
and cr.custom.resource_key == resource_key and cr.custom.resource_key == resource_key
......
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