diff options
-rw-r--r-- | lcm/ns/biz/ns_get.py | 15 | ||||
-rw-r--r-- | lcm/ns/serializers/sol/ns_instance.py | 3 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lcm/ns/biz/ns_get.py b/lcm/ns/biz/ns_get.py index ce91e785..e023a1b1 100644 --- a/lcm/ns/biz/ns_get.py +++ b/lcm/ns/biz/ns_get.py @@ -44,20 +44,15 @@ class GetNSInfoService(object): if is_sol: nsInstance = {} nsInstance['id'] = ns_inst.id - if ns_inst.name: - nsInstance['nsInstanceName'] = ns_inst.name - if ns_inst.description: - nsInstance['nsInstanceDescription'] = ns_inst.description - if ns_inst.nsd_id: - nsInstance['nsdId'] = ns_inst.nsd_id + nsInstance['nsInstanceName'] = ns_inst.name + nsInstance['nsInstanceDescription'] = ns_inst.description + nsInstance['nsdId'] = ns_inst.nsd_id + nsInstance['nsdInfoId'] = ns_inst.nspackage_id + nsInstance['nsState'] = ns_inst.status if ns_inst.nsd_invariant_id: nsInstance['nsdInvariantId'] = ns_inst.nsd_invariant_id - if ns_inst.nspackage_id: - nsInstance['nsdInfoId'] = ns_inst.nspackage_id if ns_inst.flavour_id: nsInstance['flavourId'] = ns_inst.flavour_id - if ns_inst.status: - nsInstance['nsState'] = ns_inst.status # todo 'nsScaleStatus':{} # todo 'additionalAffinityOrAntiAffinityRule':{} logger.debug(" test ") diff --git a/lcm/ns/serializers/sol/ns_instance.py b/lcm/ns/serializers/sol/ns_instance.py index b8024d57..c5ccb88a 100644 --- a/lcm/ns/serializers/sol/ns_instance.py +++ b/lcm/ns/serializers/sol/ns_instance.py @@ -681,6 +681,9 @@ class NsInstanceSerializer(serializers.Serializer): nsdId = serializers.CharField( help_text="Identifier of the NSD on which the NS instance is based.", required=True) + nsdInvariantId = serializers.CharField( + help_text="Identifier of the NSD in a version independent manner.", + required=False) nsdInfoId = serializers.CharField( help_text="Identifier of the NSD information object on which the NS instance is based.", required=True) |