sonata-nfv / tng-portal

The 5GTANGO (web) Portal
Apache License 2.0
1 stars 7 forks source link

[SM Network Services] Display SLA associated to a NS #345

Closed anapolg closed 4 years ago

anapolg commented 5 years ago

API for getting SLAs associated to a specific service implemented: curl -v -H "Content-type:application/json" http://pre-int-sp-ath.5gtango.eu:32002/api/v3/slas/templates/services/134daeab-0d7a-4096-8d6e-f1adc7705b02

Response:

{
  "slas": [
    {
      "allowed_instances": 2,
      "vendor": "tango-sla-mgmt",
      "license_type": "trial",
      "license_exp_date": "2019-06-30T00:00:00Z",
      "name": "GOLD2",
      "d_flavor": "",
      "uuid": "bad36cf8-dcc6-410a-81c2-9156a7eb8f96",
      "version": "0.1"
    }
  ]
}

cc @ekapassa @jbonnet

anapolg commented 4 years ago

Hi @ekapassa the idea is to show all the possible SLAs available to a NS descriptor? Where? In the SP menu or in the SM one? Or both?

ekapassa commented 4 years ago

Hello @anapolg If i remember correctly (because this issue is 5 months old)..the idea was to show this list of slas,, not in the SP menu...but inside its network service page.

anapolg commented 4 years ago

So the idea is to show a list of SLAs related with the network service in here https://pre-int-sp-ath.5gtango.eu/service-management/network-services/services/683d6e7a-a2bc-43fa-9c38-35fd8b0b4e4b just below the list of VNFs for example?

Is there any use for the list? Any action? Or just displaying them?

ekapassa commented 4 years ago

Yes that's right! To the best of my knowledge no, there is not any use for the list - just displaying them. Maybe just a link to the associated sla would be nice. (I mean when you click on a list item, to be redirected to the specific sla page)

anapolg commented 4 years ago

Ok, working on it.

anapolg commented 4 years ago

We have a problem with the error codes: You are responding with a 404 Not found error when there are no SLAs for a particular network service (an empty array). This is an error to be shown only when the resource or page you are trying to open could not be found on the server side.

image

image

In this case, it was found. It simply has no items inside, This should be a 200 OK as a response. In any other case different than 2XX codes, the HTTP module of the app will recognize the code as an error, which is the normal.

anapolg commented 4 years ago

Ready from Portal side. Still, it would be good to change in server side what I commented below to avoid displaying errors that are not errors.

ekapassa commented 4 years ago

@anapolg Thank you! I will fix this issue asap

ekapassa commented 4 years ago

@anapolg Is this integrated already or not? Because I cannot see the SLA associated with the ns uuid = 095539af-6688-42e7-8c1f-9563f27cb6f2 (in pre-int)

https://pre-int-sp-ath.5gtango.eu/service-platform/network-services/095539af-6688-42e7-8c1f-9563f27cb6f2

anapolg commented 4 years ago

Yes, it is integrated but SLAs are only shown in SM menu. In here: https://pre-int-sp-ath.5gtango.eu/service-management/network-services/services/095539af-6688-42e7-8c1f-9563f27cb6f2

From this ..the idea was to show this list of slas,, not in the SP menu...but inside its network service page. I understood that the SP menu is not a target for this.

ekapassa commented 4 years ago

oh yes..you are right.my mistake! mixed the links