-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server data model #4
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…boavizta_db added to ref dictionary
useful for next time : |
JSON Schema: {
"title": "Server",
"type": "object",
"properties": {
"model": {
"$ref": "#/definitions/ModelServer"
},
"configuration": {
"$ref": "#/definitions/ConfigurationServer"
},
"add_method": {
"title": "Add Method",
"type": "string"
},
"add_date": {
"title": "Add Date",
"type": "string"
}
},
"definitions": {
"ModelServer": {
"title": "ModelServer",
"type": "object",
"properties": {
"manufacturer": {
"title": "Manufacturer",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
},
"year": {
"title": "Year",
"type": "string"
}
}
},
"Cpu": {
"title": "Cpu",
"type": "object",
"properties": {
"units": {
"title": "Units",
"type": "integer"
},
"core_units": {
"title": "Core Units",
"type": "integer"
},
"die_size": {
"title": "Die Size",
"type": "number"
},
"die_size_per_core": {
"title": "Die Size Per Core",
"type": "number"
},
"process": {
"title": "Process",
"type": "number"
},
"manufacturer": {
"title": "Manufacturer",
"type": "string"
},
"manufacture_date": {
"title": "Manufacture Date",
"type": "string"
},
"model": {
"title": "Model",
"type": "string"
},
"family": {
"title": "Family",
"type": "string"
}
}
},
"Ram": {
"title": "Ram",
"type": "object",
"properties": {
"units": {
"title": "Units",
"type": "integer"
},
"capacity": {
"title": "Capacity",
"type": "integer"
},
"density": {
"title": "Density",
"type": "number"
},
"process": {
"title": "Process",
"type": "number"
},
"manufacturer": {
"title": "Manufacturer",
"type": "string"
},
"manufacture_date": {
"title": "Manufacture Date",
"type": "string"
},
"model": {
"title": "Model",
"type": "string"
},
"integrator": {
"title": "Integrator",
"type": "string"
}
}
},
"Disk": {
"title": "Disk",
"type": "object",
"properties": {
"units": {
"title": "Units",
"type": "integer"
},
"type": {
"title": "Type",
"type": "string"
},
"capacity": {
"title": "Capacity",
"type": "integer"
},
"density": {
"title": "Density",
"type": "number"
},
"manufacturer": {
"title": "Manufacturer",
"type": "string"
},
"manufacture_date": {
"title": "Manufacture Date",
"type": "string"
},
"model": {
"title": "Model",
"type": "string"
}
}
},
"PowerSupply": {
"title": "PowerSupply",
"type": "object",
"properties": {
"units": {
"title": "Units",
"type": "integer"
},
"unit_weight": {
"title": "Unit Weight",
"type": "number"
}
}
},
"ConfigurationServer": {
"title": "ConfigurationServer",
"type": "object",
"properties": {
"cpu": {
"$ref": "#/definitions/Cpu"
},
"ram": {
"title": "Ram",
"type": "array",
"items": {
"$ref": "#/definitions/Ram"
}
},
"disk": {
"title": "Disk",
"type": "array",
"items": {
"$ref": "#/definitions/Disk"
}
},
"power_supply": {
"$ref": "#/definitions/PowerSupply"
}
}
}
}
} |
J'essaye d'utiliser Eleventy pour constituer mon objet à exploiter. Je ne sais pas comment stocker au mieux les fichiers "inventaire", je réfléchis pour le moment ça donne |
Surement la meilleure manière en effet. L'exemple suit le modèle ci-dessus |
On peut aussi construire un CSV avec des intitulés sous cette forme : configuration:cpu:number On peut utiliser ce package NPM pour convertir en format structuré : |
Ce qui impliquerait quand même de travail en priorité sur un fichier unique avec plein de serveurs, plutôt que plein de fichiers éclatés. Pour le CSV, ça donnerait un truc comme ça :
|
Ma lib node n'a pas l'air d'aimer les double quote sur les champs. Donc, ça marche mieux sans double quote. Si fichier json dans un répertoire, j'envoie le contenu de ce json pour la requête ; Mais l'accès au serveur de test a l'air de ne plus marcher.
|
Hum on a publié ce matin dessus la V0. |
Tu as une issue dédié ici => #14 |
Ok, J'obtiens bien le résultat. Je continuerai la semaine prochaine. J'ai donc script Node. Qui fonctionne avec eleventy et que je dois paramétrer pour fonctionner avec goHugo. Il faut ajouter une colonne au CSV pour avoir le nom de serveur. Ensuite. suffira de savoir ce que je fais avec ces données. J'ai les informations en entrée que je peux exploiter ; plus celle de l’API que je peux afficher aussi. C'est quoi exactement : gwp, pe, adp ? |
|
je passe nos discussion sur => #14 pour avoir l'historique |
Epic
Server
Route(s) involved
/v1/server/ref_data
/v1/server/bottom_up
/v1/server/
Description
The server data model contains all the data describing a server, except for its impact. When fully filled, a server object contains :
Example
The text was updated successfully, but these errors were encountered: