X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fns.py;h=033063389ed1a23e867c7ac417fc2cb31a23be20;hb=818d70c467e1ae3f7fc4faf4a6bc711393c5f175;hp=a8c6a8c3be89363f5eac0f5c633a4ccadda0d488;hpb=6a470c6529293da9a67fb366713f078a9fa70541;p=osm%2FLCM.git diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index a8c6a8c..0330633 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -2272,14 +2272,12 @@ class NsLcm(LcmBase): vdu_scaling_info = {"scaling_group_name": scaling_group, "vdu": []} if scaling_type == "SCALE_OUT": # count if max-instance-count is reached - if "max-instance-count" in scaling_descriptor and scaling_descriptor["max-instance-count"] is not None: - max_instance_count = int(scaling_descriptor["max-instance-count"]) - - # self.logger.debug("MAX_INSTANCE_COUNT is {}".format(scaling_descriptor["max-instance-count"])) - if nb_scale_op >= max_instance_count: - raise LcmException("reached the limit of {} (max-instance-count) " - "scaling-out operations for the " - "scaling-group-descriptor '{}'".format(nb_scale_op, scaling_group)) + max_instance_count = scaling_descriptor.get("max-instance-count", 10) + # self.logger.debug("MAX_INSTANCE_COUNT is {}".format(max_instance_count)) + if nb_scale_op >= max_instance_count: + raise LcmException("reached the limit of {} (max-instance-count) " + "scaling-out operations for the " + "scaling-group-descriptor '{}'".format(nb_scale_op, scaling_group)) nb_scale_op += 1 vdu_scaling_info["scaling_direction"] = "OUT"