Closed chandra0293 closed 5 years ago
You should follow the instructions in the README section "Dynamic Emulation".
To make things easier, the following examples exist in the repository
The code fragment you include has calls the Flask(), app.run and api.add_resource. These fragments are in the emulator_api.py file. You shouldn't need to touch this or extract any code from it.
thank you
On Wed, Aug 14, 2019 at 1:59 AM John Leung notifications@github.com wrote:
The code fragment you include has calls the Flask(), app.run and api.add_resource. These fragments are in the emulator_api.py file. You shouldn't need to touch this or extract any code from it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfish-Interface-Emulator/issues/84?email_source=notifications&email_token=AL5RIWUOOQWWGGDZ5IYN2JLQEMKS7A5CNFSM4ILJEUHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4G4NWY#issuecomment-520996571, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5RIWSZTQIAI2QLLNIPTFDQEMKS7ANCNFSM4ILJEUHA .
in this file populate-config.json chassis count 13 can i change this count to 1.
chassis contain 12 cartridges(here cartridges are Server,storage ,NIC ,FPGA,GPU) or 24 cartridge, 2 switch card
each cartridge(server ) have 2 nodes
On Wed, Aug 14, 2019 at 11:02 AM Chandra Tejaswini < mandhalatejaswini@gmail.com> wrote:
thank you
On Wed, Aug 14, 2019 at 1:59 AM John Leung notifications@github.com wrote:
The code fragment you include has calls the Flask(), app.run and api.add_resource. These fragments are in the emulator_api.py file. You shouldn't need to touch this or extract any code from it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfish-Interface-Emulator/issues/84?email_source=notifications&email_token=AL5RIWUOOQWWGGDZ5IYN2JLQEMKS7A5CNFSM4ILJEUHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4G4NWY#issuecomment-520996571, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5RIWSZTQIAI2QLLNIPTFDQEMKS7ANCNFSM4ILJEUHA .
how to change this populate-config.json file based on my requirements? Chassis Count -1 Cartridge Count -12 or 24 (Server , storage,NIC,FPGA ,GPU) Each Cartridge node count -2 or 4 (if cartridge is server) SwitchCard count -2 Each SwitchCard Device count -2 (Storage ,NIC ,FPGA,GPU)
On Wed, Aug 14, 2019 at 11:24 AM Chandra Tejaswini < mandhalatejaswini@gmail.com> wrote:
in this file populate-config.json chassis count 13 can i change this count to 1.
chassis contain 12 cartridges(here cartridges are Server,storage ,NIC ,FPGA,GPU) or 24 cartridge, 2 switch card
each cartridge(server ) have 2 nodes
- each switch having 2 devices (Device are NIC ,Storage ,FPGA,GPU ) *
On Wed, Aug 14, 2019 at 11:02 AM Chandra Tejaswini < mandhalatejaswini@gmail.com> wrote:
thank you
On Wed, Aug 14, 2019 at 1:59 AM John Leung notifications@github.com wrote:
The code fragment you include has calls the Flask(), app.run and api.add_resource. These fragments are in the emulator_api.py file. You shouldn't need to touch this or extract any code from it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfish-Interface-Emulator/issues/84?email_source=notifications&email_token=AL5RIWUOOQWWGGDZ5IYN2JLQEMKS7A5CNFSM4ILJEUHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4G4NWY#issuecomment-520996571, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5RIWSZTQIAI2QLLNIPTFDQEMKS7ANCNFSM4ILJEUHA .
Before using Infragen, have you verified that you can manual create the dynamic resources? This can be done by doing a HTTP POST to the new resource instances. You should be able to manually POST each resource to verify each dynamic resource is operational.
(BTW, I did not write the Infragen code. It was contributed to the repository by another developer. So I will not be of much help in crafting an emulator-config.json file for your purposes.)
yes manually created dynamic resources its working thank you.
On Wed, Aug 14, 2019 at 2:49 PM John Leung notifications@github.com wrote:
Before using Infragen, have you verified that you can manual create the dynamic resources? This can be done by doing a HTTP POST to the new resource instances. You should be able to manually POST each resource to verify each dynamic resource is operational.
(BTW, I did not write the Infragen code. It was contributed to the repository by another developer. So I will not be of much help in crafting an emulator-config.json file for your purposes.)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfish-Interface-Emulator/issues/84?email_source=notifications&email_token=AL5RIWU2RAZTYTCDDZ6DRCTQEPE2NA5CNFSM4ILJEUHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4IGZDY#issuecomment-521170063, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5RIWSFNLJAOVRKAU4P4PLQEPE2NANCNFSM4ILJEUHA .
from flask import Flask from flask_restful import Resource, Api import sys, traceback import copy import strgen from utils import replace_recurse
from Acclipc.mdc_webtask import *
BASE_PATH = "/redfish/v1/"
app = Flask(name) api = Api(app)
class ResourceCollection(Resource): def init(self): self.rest_base = BASE_PATH self.uuid = ""
class Chassis(Resource):
class Chassisinfo(Resource):
class CartridgeCollection(Resource):
api.add_resource(ResourceCollection, '/redfish/v1') api.add_resource(Chassis, '/redfish/v1/Chassis') api.add_resource(Chassisinfo, '/redfish/v1/Chassis/')
api.add_resource(CartridgeCollection, '/redfish/v1/Chassis//')
if name == 'main': app.run('0.0.0.0', debug=True)