# contact: bdiaz@whitestack.com or glavado@whitestack.com
##
-FROM ubuntu:16.04
+FROM ubuntu:20.04
RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python-all python3 python3-pip debhelper wget && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev libxml2 python3-all && \
- DEBIAN_FRONTEND=noninteractive pip3 install -U setuptools setuptools-version-command stdeb
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox=3.13.2-2 make=4.2.1-1.2 python-all=2.7.17-2ubuntu4 python3=3.8.2-0ubuntu2 python3-pip=20.0.2-5ubuntu1.1 debhelper wget && \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev=8.0.23-0ubuntu0.20.04.1 libxml2 python3-all=3.8.2-0ubuntu2 dh-python=4.20191017ubuntu7 && \
+ DEBIAN_FRONTEND=noninteractive pip3 install -U setuptools==53.0.0 setuptools-version-command==2.2 stdeb==0.10.0
LABEL authors="Benjamín Díaz, Fabián Bravo"
RUN apt-get --yes update \
- && apt-get --yes install python3 python3-pip libmysqlclient-dev git mysql-client \
- && pip3 install pip==9.0.3
+ && apt-get --yes install python3=3.8.2-0ubuntu2 python3-pip=20.0.2-5ubuntu1.1 libmysqlclient-dev=8.0.23-0ubuntu0.20.04.1 git mysql-client=8.0.23-0ubuntu0.20.04.1 \
+ && pip3 install pip==21.0.1
COPY requirements.txt /policy_module/requirements.txt
log.debug("No scaling aspect present in vnfd")
continue
# TODO: Change for multiple instantiation levels support
- instantiation_level = df.get('instantiation-level', [{}])[0]
scaling_aspects = df['scaling-aspect']
all_vnfd_monitoring_params = self._get_all_vnfd_monitoring_params(vnfd)
for scaling_aspect in scaling_aspects:
if admin_scale_info["name"] == scaling_aspect["name"]:
nb_scale_op = admin_scale_info.get("nb-scale-op", 0)
break
- for vdu_level in instantiation_level.get('vdu-level', ()):
- if vdu_level.get('vdu-id') == vdu_id:
- min_instance_count = int(vdu_level['number-of-instances'])
- if nb_scale_op > min_instance_count:
+ min_instance_count = 1
+ for vdu_profile in df.get('vdu-profile', ()):
+ if vdu_profile.get('id') == vdu_id:
+ min_instance_count = int(vdu_profile.get('min-number-of-instances ', 1))
+ break
+ if nb_scale_op >= min_instance_count:
alarm_uuid = await self.mon_client.create_alarm(
metric_name=metric_name,
ns_id=nsr_id,