Skip to content

Commit b973dbc

Browse files
committed
fix schema of ComputerSystemsCollection
Signed-off-by: hammadzf <hammad.zafar@y7mail.com>
1 parent db48f17 commit b973dbc

3 files changed

Lines changed: 14 additions & 21 deletions

File tree

Resources/Systems/index.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
"@odata.id": "/redfish/v1/Systems",
44
"@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
55
"Name": "Computer System Collection",
6-
7-
"Links": {
8-
"Members@odata.count":2,
9-
"Members": [
10-
{
11-
"@odata.id": "/redfish/v1/Systems/1"
12-
},
13-
{
14-
"@odata.id": "/redfish/v1/Systems/2"
15-
}
16-
]
17-
}
6+
"Members@odata.count":2,
7+
"Members": [
8+
{
9+
"@odata.id": "/redfish/v1/Systems/1"
10+
},
11+
{
12+
"@odata.id": "/redfish/v1/Systems/2"
13+
}
14+
]
1815
}

api_emulator/redfish/ComputerSystem_api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,10 @@ def __init__(self):
159159
'@odata.id': self.rb + 'ComputerSystemCollection',
160160
'@odata.type': '#ComputerSystemCollection.ComputerSystemCollection',
161161
'Name': 'ComputerSystem Collection',
162-
'Links': {}
163-
}
164-
self.config['Links']['Members@odata.count'] = len(members)
165-
self.config['Links']['Members'] = [{'@odata.id':x['@odata.id']} for
162+
'Members@odata.count': len(members),
163+
'Members': [{'@odata.id':x['@odata.id']} for
166164
x in list(members.values())]
165+
}
167166

168167
# HTTP GET
169168
def get(self):

api_emulator/redfish/computer_systems.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ def configuration(self):
3939
'@odata.type': '#ComputerSystemCollection.ComputerSystemCollection',
4040
'@odata.id': '/redfish/v1/Systems',
4141
'Name': 'Computer System Collection',
42-
43-
'Links': {
44-
'Members@odata.count': len(systems),
45-
'Members': systems
46-
}
42+
'Members@odata.count': len(systems),
43+
'Members': systems
4744
}
4845

4946
@property

0 commit comments

Comments
 (0)