SNIA / Swordfish-basic-web-client

The Swordfish Basic Web Client can connect to one or more Swordfish services (including the Swordfish emulator), and present in a web UI frame the entire Swordfish hierarchy. The basic web client also provides basic capabilities to modify configurable Properties (as specified in the schema), as well an providing a basic interface to add or remove elements from the service through a Web UI.
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

Does not remove items in Redfish collections #29

Closed ddeel closed 6 years ago

ddeel commented 6 years ago

When you click on "Remove" for a StorageService collection or a StorageSystems collection, you are able to successfully remove an item by clicking on the minus sign ("-"), and the client responds with an alert saying "Deleted Sucessfully".

When you click on "Remove" for any of the Redfish collections (Chassis, Managers, Systems, etc) and try to do the same thing, it fails to remove the item and the client responds with an alert saying "Deleting a service Failed".

This can be reproduced by using the client with the Swordfish API Emulator running in its default configuration.

sravanthikalluri19 commented 6 years ago

@ddeel it might be because of the delete request to the Redfish API has stopped running or the url doesn't exist. could you please test the same operation either in POSTMAN or Advanced REST Client and let us know if you are able to see the expected behaviour

ddeel commented 6 years ago

To replicate an example of the problem, start the client, open an instance of a Swordfish Service running on the emulator in its default configuration, look at "Chassis" in that instance, and click on the "Remove" button: image

Now click on the minus sign next to "Chassis-12" and the following alert comes up: image

If you then click on "OK" in the alert, the resource has not been removed: image

If you send the following DELETE command using the Restlet Client, the resource is properly deleted: image

After deleting "Chassis-12" with the Restlet Client, the Swordfish Basic Web Client shows that it has been deleted from the Chassis collection: image

The Restlet Client is able to delete resources in the Chassis collection, but the client is not able to do this. The problem is also present for the Managers collection and the Systems collection, and possibly others.

sravanthikalluri19 commented 6 years ago

We will find the RCA for it and update the code to resolve the bug in basic web client

sravanthikalluri19 commented 6 years ago

@ddeel We found the root cause for it. Currently swordfish Emulator is deleting the collection based on the request body, where as redfish is doing with the complete resource URI As our web client code is written on swordfish emulator we couldn't perform the delete operation successfully for redfish

@chandramouli12 please look into this.