sonata-nfv / tng-portal

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

[VnV Platform settings] #450

Closed sinaure closed 4 years ago

sinaure commented 5 years ago

I can't modify or delete the OSM platform

Annotation 2019-11-06 091729

message errors:

'there is an error deleting the platform' and 'Unable to fetch the platform'

anapolg commented 5 years ago

Which environment is that? Are you having connection problems?

sinaure commented 5 years ago

this is a local instance (in EGM) of the VNV. Has been installed using v.5 of tng-devops with

sudo ansible-playbook roles/vnv.yml -i environments -e "target=localhost" -e platform=vnv --ask-vault-pass

sinaure commented 5 years ago

Capture

anapolg commented 5 years ago

Could you try to edit/delete the one without spaces in the name?

sinaure commented 5 years ago

yes I can modify sonata

anapolg commented 5 years ago

I did a test with Portal and I can modify both, platforms with spaces in the name and without them.

image

The DELETE request is the same as in your screenshot so I do not consider this as a Portal error since the request is well formed in both cases.

Maybe v5.0 does not support yet spaces in the name in server side so I suggest you two possible solutions:

Please close the issue if any of these two solutions works for you.

sinaure commented 5 years ago

I am using an existing SP : sta-sp-ave

sinaure commented 5 years ago

@arocha7

anapolg commented 5 years ago

I bet that the problem is that the name is OSM Local with an space in the middle. So, if you are able to change that name (used as the platform ID) somehow or, if you can create another platform with the same data but another name, I think it should work.

anapolg commented 5 years ago

Besides, how did you create the platform? The host is missing the http:// before the IP. I have tested this with Portal and:

jbonnet commented 5 years ago

hmm... 200with an error body?!? We need to change this into 400! Which component is generating it?

anapolg commented 5 years ago

Whichever is behind POST .../settings/platforms image

image

felipevicens commented 5 years ago

Fixed, now returns 400 if http:// is not specified. Host have to be with the format http://

sinaure commented 5 years ago

Still I've the same error do I have to point on SP pre int? Capture

anapolg commented 5 years ago

Try to create a platform with the correct host format and probably with a name composed with dashes instead of spaces (just in case this was not supported in version v5.0). Use the same information you have in that platform and test the resulting new one.

If the error persists please move your tests to a shared environment where I can check the behavior.

sinaure commented 5 years ago

The behaviour I am testing is: Can I use the VNV as exploitable asset? (installed locally): by now is not possible because I can't modify or delete the existing default platform connections (for OSM): I've tried to add another osm platform but the save button does nothing... NO logs in console :-/

@Ana to reproduce it install the VNV locally

sudo ansible-playbook roles/vnv.yml -i environments -e "t arget=localhost" -e platform=vnv --ask-vault-pass

ana commented 5 years ago

@sinaure I think you meant @anapolg and not @ana

anapolg commented 5 years ago

Since you can operate with other platforms (i.e you can delete Sonata one) this does not seem as a Portal error. Portal request for DELETE for example, are the same for all type of platforms. This indicates that you have a problem with your particular OSM platform. Please fix your platform errors creating a well defined one and then we'll see if there is something else to reproduce or test in Portal.

Regarding I've tried to add another osm platform but the save button does nothing... NO logs in console :-/

image

sinaure commented 5 years ago

Capture

Button save does not became red

sinaure commented 5 years ago

I don't know if it is relatd but in my browser console I've found these errors 👍 Capture

anapolg commented 5 years ago

You are not fulfilling the name in that capture. You need to give it a name

anapolg commented 5 years ago

Also, the errors you are seeing were caused because you had to log in again (auth token expired). You must have seen a pop up telling you to log in again. After you log in those errors should stop.

sinaure commented 5 years ago

ok now I can add a new platform... I just can't remove an old one still error 400 on http://192.168.1.181/api/v3/settings/platforms/OSM%20Local

anapolg commented 4 years ago

And with the new one, can you edit it or remove it?

sinaure commented 4 years ago

yes i can

anapolg commented 4 years ago

Then, the only thing missing you need to do is to remove the old VIM (the one giving errors) manually. It is a wrong formatted VIM and, neither the Portal nor the backend services behind, support modifying or deleting it.

I guess you (or someone) created it manually. Or, maybe you imported it from another deployment. Anyhow, it doesn't seem that the Portal would allow you to create it so, it is normal that the Portal does not allow you to remove it either.

sinaure commented 4 years ago

is created with the tng-devops script (not sure where) @felipevicens

anapolg commented 4 years ago

Then it is not a Portal issue. You would need to remove it manually somehow. I can not help you with that.

Please close the issue when you can. Thanks