basePath: /api/v1 definitions: models.AddHost: properties: hostname: type: string type: object models.CPU: properties: cores: type: integer host_id: type: integer id: type: integer name: type: string socket: type: integer time: type: string type: object models.Error: properties: error: type: string status: type: string type: object models.Host: properties: cpus: items: $ref: '#/definitions/models.CPU' type: array hostname: type: string memory: items: $ref: '#/definitions/models.Memory' type: array type: object models.Memory: properties: host_id: type: integer id: type: integer time: type: string total: type: integer type: type: string usage: type: number used: type: integer type: object info: contact: {} paths: /cpus/add_cpu_to_host: post: consumes: - application/json description: Create a CPU parameters: - description: The host to create in: body name: host required: true schema: $ref: '#/definitions/models.CPU' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/models.CPU' "400": description: Bad Request schema: $ref: '#/definitions/models.Error' "404": description: Not Found schema: $ref: '#/definitions/models.Error' "409": description: Conflict schema: $ref: '#/definitions/models.Error' summary: Create a CPU tags: - CPUs /cpus/cpus: get: consumes: - application/json description: Lists all the CPUs in LSM for every host produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/models.CPU' type: array summary: Get all CPUs in LSM tags: - CPUs /hosts/add_host: post: consumes: - application/json description: Create a host parameters: - description: The host to create in: body name: host required: true schema: $ref: '#/definitions/models.AddHost' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/models.AddHost' "400": description: Bad Request schema: $ref: '#/definitions/models.Error' "409": description: Conflict schema: $ref: '#/definitions/models.Error' summary: Create a host tags: - Hosts /hosts/delete_host/{host_id}: delete: consumes: - application/json description: Delete a host parameters: - description: The ID of the host to be deleted in: path name: host_id required: true type: string produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/models.Error' "404": description: Not Found schema: $ref: '#/definitions/models.Error' summary: Delete a host tags: - Hosts /hosts/delete_host_by_hostname/{hostname}: delete: consumes: - application/json description: Delete a host using it hostname parameters: - description: The hostname of the host to be deleted in: path name: hostname required: true type: string produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/models.Error' "404": description: Not Found schema: $ref: '#/definitions/models.Error' summary: Delete a host using its hostname tags: - Hosts /hosts/get_host_by_hostname/{hostname}: get: consumes: - application/json description: Get a host by hostname parameters: - description: The hostname to get the host by in: path name: hostname required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.Host' "400": description: Bad Request schema: $ref: '#/definitions/models.Error' "404": description: Not Found schema: $ref: '#/definitions/models.Error' summary: Get a host by hostname tags: - Hosts /hosts/get_host_id_for_hostname/{hostname}: get: consumes: - application/json description: Get a host ID for hostname parameters: - description: The hostname to get the host ID by in: path name: hostname required: true type: string produces: - application/json responses: "200": description: OK schema: type: integer "400": description: Bad Request schema: $ref: '#/definitions/models.Error' "404": description: Not Found schema: $ref: '#/definitions/models.Error' summary: Get a host ID for hostname tags: - Hosts /hosts/hosts: get: consumes: - application/json description: Lists all the hosts in LSM produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/models.Host' type: array summary: Get all hosts in LSM tags: - Hosts swagger: "2.0"