diff --git a/lib-dmtf/model/Links.go b/lib-dmtf/model/Links.go index eb57d34..cdd10f6 100644 --- a/lib-dmtf/model/Links.go +++ b/lib-dmtf/model/Links.go @@ -21,7 +21,8 @@ type Links struct { ComputerSystems []*Link `json:"ComputerSystems,omitempty"` ConnectedPorts []*Link `json:"ConnectedPorts,omitempty"` ConsumingComputerSystems []*Link `json:"ConsumingComputerSystems,omitempty"` - ContainedBy *Link `json:"ContainedBy,omitempty"` + ContainedBy Link `json:"ContainedBy"` + Contains []*Link `json:"Contains"` ContainedByZones []*Link `json:"ContainedByZones,omitempty"` CooledBy []*Link `json:"CooledBy,omitempty"` Endpoints []*Link `json:"Endpoints,omitempty"` diff --git a/svc-api/router/router.go b/svc-api/router/router.go index bfef0b0..4bfedf1 100644 --- a/svc-api/router/router.go +++ b/svc-api/router/router.go @@ -441,8 +441,12 @@ func Router() *iris.Application { chassis.Get("/{id}/NetworkAdapters/{rid}", cha.GetChassisResource) chassis.Get("/{id}/NetworkAdapters/{id2}/NetworkDeviceFunctions", cha.GetChassisResource) chassis.Get("/{id}/NetworkAdapters/{id2}/NetworkPorts", cha.GetChassisResource) - chassis.Get("/{id}/NetworkAdapters/{id2}/NetworkDeviceFunctions/{rid}", cha.GetChassisResource) chassis.Get("/{id}/NetworkAdapters/{id2}/NetworkPorts/{rid}", cha.GetChassisResource) + chassis.Get("/{id}/NetworkAdapters/{id2}/NetworkDeviceFunctions/{rid}", cha.GetChassisResource) + chassis.Get("/{id}/NetworkAdapters/{id2}/NetworkDeviceFunctions/{rid}/VLANS", cha.GetChassisResource) + chassis.Get("/{id}/NetworkAdapters/{id2}/Ports/{rid}", cha.GetChassisResource) + chassis.Get("/{id}/NetworkAdapters/{id2}/Ports", cha.GetChassisResource) + chassis.Get("/{id}/NetworkAdapters/{id2}/Assembly", cha.GetChassisResource) chassis.Any("/", handle.ChassisMethodNotAllowed) chassis.Any("/{id}", handle.ChassisMethodNotAllowed) chassis.Any("/{id}/NetworkAdapters", handle.ChassisMethodNotAllowed) @@ -469,9 +473,12 @@ func Router() *iris.Application { chassis.Get("/{id}/LogServices/{rid}", cha.GetChassisResource) chassis.Get("/{id}/LogServices/{rid}/Entries", cha.GetChassisResource) chassis.Get("/{id}/LogServices/{rid}/Entries/{rid2}", cha.GetChassisResource) + chassis.Get("/{id}/Drives", cha.GetChassisResource) + chassis.Get("/{id}/Memory", cha.GetChassisResource) + chassis.Get("/{id}/MemoryDomains", cha.GetChassisResource) // TODO // chassis.Post("/{id}/LogServices/{rid}/Actions/LogService.ClearLog", cha.GetChassisResource) - chassis.Any("/{id}/LogServices", handle.ChassisMethodNotAllowed) + chassis.Get("/{id}/LogServices", cha.GetChassisResource) chassis.Any("/{id}/LogServices/{rid}", handle.ChassisMethodNotAllowed) chassis.Any("/{id}/LogServices/{rid}/Entries", handle.ChassisMethodNotAllowed) chassis.Any("/{id}/LogServices/{rid}/Entries/{rid2}", handle.ChassisMethodNotAllowed) diff --git a/svc-device-manager/rest/server.go b/svc-device-manager/rest/server.go index 5197ff7..88eff76 100644 --- a/svc-device-manager/rest/server.go +++ b/svc-device-manager/rest/server.go @@ -30,6 +30,28 @@ func createRouting(app *iris.Application, config config.Config) { routes := app.Party("/ODIM/v1") { + chassis := routes.Party("/Chassis", basicAuthHandler) + chassis.Get("", getGenericResourceHandler) + chassis.Get("/{id}", getGenericResourceHandler) + chassis.Get("/{id}/Thermal", getGenericResourceHandler) + chassis.Get("/{id}/Assembly", getGenericResourceHandler) + chassis.Get("/{id}/Drives", getGenericResourceHandler) + chassis.Get("/{id}/Memory", getGenericResourceHandler) + chassis.Get("/{id}/MemoryDomains", getGenericResourceHandler) + chassis.Get("/{id}/Sensors", getGenericResourceHandler) + chassis.Get("/{id}/LogServices", getGenericResourceHandler) + chassisPower := chassis.Party("/{id}/Power") + chassisPower.Get("", getGenericResourceHandler) + chassisNetworkAdapters := chassis.Party("/{id}/NetworkAdapters") + chassisNetworkAdapters.Get("", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/Assembly", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/NetworkDeviceFunctions", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/NetworkDeviceFunctions/{id2}", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/NetworkDeviceFunctions/{id2}/VLANS", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/NetworkPorts", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/NetworkPorts/{id2}", getGenericResourceHandler) + chassisNetworkAdapters.Get("/{id}/Ports", getGenericResourceHandler) systems := routes.Party("/Systems", basicAuthHandler) systems.Get("", getGenericResourceHandler) systems.Get("/{id}", getGenericResourceHandler)