sushy/sushy
Lucas Alvares Gomes 392a4a6272 Sushy to adhere to the resource identifier portion of the spec
This patch is intended to make the handle of the resources
identification more flexible in the library. Prior to this patch the
library had some assumptions about the path of a given resource and
tried to build such paths within it. Turns out that it's not that
simple, the Redfish specification does allow things like resources from
a different authority to be registered in a different controller [0].
I quote:

"Resources within the same authority as the request URI shall be
represented according to the rules of path-absolute defined by that
specification. That is, they shall always start with a single forward
slash ("/"). Resources within a different authority as the request URI
shall start with a double-slash ("//") followed by the authority and
path to the resource."

That means that, members of a collection could
be either: "/redfish/v1/Systems/12345" or
"//another-service.com/redfish/v1/Systems/12345"

This breaks many of the assumptions we had before of how to handle these
resources from the controller.

So, this patch is basically making sushy more "dumb" about the location
of the resources by not trying to build the URI for it but instead just
relying on the URI returned from the members of a collection or other
attributes of a specific resource. One example here was the "target"
attribute of the #ComputerSystem.Reset reset action, prior to this patch
we needed to strip portions of the URI (the /redfish/v1) in order to fit
the model that we use to construct the URLs now, that's not needed
anymore.

Note that, this patch is non-backward compatible and changes the usage
of the library but, since we haven't had any release yet (so it's not
even alpha or beta, but completely under-development) it seems to be the
right time for such a change.

[0] http://redfish.dmtf.org/schemas/DSP0266_1.1.html#resource-identifier-property

Change-Id: Ia4211ebb3b99f6cc4bd695b5dbea2018d301de33
2017-03-24 14:28:16 +00:00
..
resources Sushy to adhere to the resource identifier portion of the spec 2017-03-24 14:28:16 +00:00
tests Sushy to adhere to the resource identifier portion of the spec 2017-03-24 14:28:16 +00:00
__init__.py Add link to the python documentation about the NullHandler 2017-02-27 14:57:05 +00:00
connector.py Sushy to adhere to the resource identifier portion of the spec 2017-03-24 14:28:16 +00:00
exceptions.py Rework exceptions 2017-02-28 11:03:35 +00:00
main.py Sushy to adhere to the resource identifier portion of the spec 2017-03-24 14:28:16 +00:00
utils.py Sushy to adhere to the resource identifier portion of the spec 2017-03-24 14:28:16 +00:00