From 59abe6c231778617789beafb0e5ace5523f13f52 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 1 Mar 2024 16:00:22 -0700 Subject: [PATCH 01/19] Add Triad license --- internal/postgres/postgres.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/postgres/postgres.go b/internal/postgres/postgres.go index 747c5ec..76e5934 100644 --- a/internal/postgres/postgres.go +++ b/internal/postgres/postgres.go @@ -1,3 +1,16 @@ +// Copyright © 2023 Triad National Security, LLC. All rights reserved. +// +// This program was produced under U.S. Government contract 89233218CNA000001 +// for Los Alamos National Laboratory (LANL), which is operated by Triad +// National Security, LLC for the U.S. Department of Energy/National Nuclear +// Security Administration. All rights in the program are reserved by Triad +// National Security, LLC, and the U.S. Department of Energy/National Nuclear +// Security Administration. The Government is granted for itself and others +// acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license +// in this material to reproduce, prepare derivative works, distribute copies to +// the public, perform publicly and display publicly, and to permit others to do +// so. + package postgres import ( From 0e5ef8c6542561dac66bba85905cc582f80c032b Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 17:43:01 -0700 Subject: [PATCH 02/19] Delete postgres integration tests These now live in the deployment-recipes repo --- Dockerfile.bss-debugger.Dockerfile | 31 - Dockerfile.bss-postgres-test.Dockerfile | 35 - docker-compose.bss-debugger.yaml | 122 -- docker-compose.test.postgres.yaml | 109 -- runBssDebugger.sh | 87 - runPostgresTest.sh | 85 - test/ct/postgres/run.sh | 31 - .../mac/01-smd-add-redfish-endpoints.hurl | 1471 ----------------- .../tests/mac/02-smd-get-components.hurl | 28 - .../mac/03-smd-get-component-endpoints.hurl | 109 -- .../postgres/tests/mac/04-bss-add-macs.hurl | 62 - .../tests/mac/05-bss-add-duplicate-mac.hurl | 51 - .../tests/mac/05-bss-update-empty.hurl | 7 - .../mac/06-bss-update-nonexistant-mac.hurl | 8 - .../tests/mac/07-bss-update-mixed-mac.hurl | 9 - .../tests/mac/08-bss-update-params.hurl | 69 - .../mac/09-bss-update-kernel-initrd.hurl | 72 - .../tests/mac/10-bss-update-reset.hurl | 54 - .../tests/mac/11-bss-update-duplicate.hurl | 54 - .../postgres/tests/mac/12-bss-delete-mac.hurl | 44 - .../mac/13-bss-get-boot-script-mac1.hurl | 22 - .../mac/14-bss-get-boot-script-mac2.hurl | 22 - .../mac/15-bss-delete-by-boot-config.hurl | 18 - .../mac/16-smd-delete-redfish-endpoints.hurl | 16 - .../tests/mac/17-smd-delete-components.hurl | 16 - .../18-smd-delete-component-endpoints.hurl | 16 - .../nid/01-smd-add-redfish-endpoints.hurl | 1471 ----------------- .../tests/nid/02-smd-get-components.hurl | 28 - .../nid/03-smd-get-component-endpoints.hurl | 109 -- .../postgres/tests/nid/04-bss-add-nids.hurl | 61 - .../tests/nid/05-bss-delete-nid.hurl.notest | 44 - .../nid/06-bss-get-boot-script-nid1.hurl | 22 - .../nid/07-bss-get-boot-script-mac2.hurl | 22 - .../08-bss-delete-by-boot-config.hurl.notest | 18 - ...9-smd-delete-redfish-endpoints.hurl.notest | 16 - .../nid/10-smd-delete-components.hurl.notest | 16 - ...smd-delete-component-endpoints.hurl.notest | 16 - .../xname/01-smd-add-redfish-endpoints.hurl | 1471 ----------------- .../tests/xname/02-smd-get-components.hurl | 28 - .../xname/03-smd-get-component-endpoints.hurl | 109 -- .../tests/xname/04-bss-add-xnames.hurl | 61 - .../tests/xname/05-bss-delete-xname.hurl | 44 - .../xname/06-bss-get-boot-script-xname1.hurl | 22 - .../xname/07-bss-get-boot-script-xname2.hurl | 22 - .../xname/08-bss-delete-by-boot-config.hurl | 18 - .../09-smd-delete-redfish-endpoints.hurl | 16 - .../tests/xname/10-smd-delete-components.hurl | 16 - .../11-smd-delete-component-endpoints.hurl | 16 - 48 files changed, 6294 deletions(-) delete mode 100644 Dockerfile.bss-debugger.Dockerfile delete mode 100644 Dockerfile.bss-postgres-test.Dockerfile delete mode 100644 docker-compose.bss-debugger.yaml delete mode 100644 docker-compose.test.postgres.yaml delete mode 100755 runBssDebugger.sh delete mode 100755 runPostgresTest.sh delete mode 100755 test/ct/postgres/run.sh delete mode 100644 test/ct/postgres/tests/mac/01-smd-add-redfish-endpoints.hurl delete mode 100644 test/ct/postgres/tests/mac/02-smd-get-components.hurl delete mode 100644 test/ct/postgres/tests/mac/03-smd-get-component-endpoints.hurl delete mode 100644 test/ct/postgres/tests/mac/04-bss-add-macs.hurl delete mode 100644 test/ct/postgres/tests/mac/05-bss-add-duplicate-mac.hurl delete mode 100644 test/ct/postgres/tests/mac/05-bss-update-empty.hurl delete mode 100644 test/ct/postgres/tests/mac/06-bss-update-nonexistant-mac.hurl delete mode 100644 test/ct/postgres/tests/mac/07-bss-update-mixed-mac.hurl delete mode 100644 test/ct/postgres/tests/mac/08-bss-update-params.hurl delete mode 100644 test/ct/postgres/tests/mac/09-bss-update-kernel-initrd.hurl delete mode 100644 test/ct/postgres/tests/mac/10-bss-update-reset.hurl delete mode 100644 test/ct/postgres/tests/mac/11-bss-update-duplicate.hurl delete mode 100644 test/ct/postgres/tests/mac/12-bss-delete-mac.hurl delete mode 100644 test/ct/postgres/tests/mac/13-bss-get-boot-script-mac1.hurl delete mode 100644 test/ct/postgres/tests/mac/14-bss-get-boot-script-mac2.hurl delete mode 100644 test/ct/postgres/tests/mac/15-bss-delete-by-boot-config.hurl delete mode 100644 test/ct/postgres/tests/mac/16-smd-delete-redfish-endpoints.hurl delete mode 100644 test/ct/postgres/tests/mac/17-smd-delete-components.hurl delete mode 100644 test/ct/postgres/tests/mac/18-smd-delete-component-endpoints.hurl delete mode 100644 test/ct/postgres/tests/nid/01-smd-add-redfish-endpoints.hurl delete mode 100644 test/ct/postgres/tests/nid/02-smd-get-components.hurl delete mode 100644 test/ct/postgres/tests/nid/03-smd-get-component-endpoints.hurl delete mode 100644 test/ct/postgres/tests/nid/04-bss-add-nids.hurl delete mode 100644 test/ct/postgres/tests/nid/05-bss-delete-nid.hurl.notest delete mode 100644 test/ct/postgres/tests/nid/06-bss-get-boot-script-nid1.hurl delete mode 100644 test/ct/postgres/tests/nid/07-bss-get-boot-script-mac2.hurl delete mode 100644 test/ct/postgres/tests/nid/08-bss-delete-by-boot-config.hurl.notest delete mode 100644 test/ct/postgres/tests/nid/09-smd-delete-redfish-endpoints.hurl.notest delete mode 100644 test/ct/postgres/tests/nid/10-smd-delete-components.hurl.notest delete mode 100644 test/ct/postgres/tests/nid/11-smd-delete-component-endpoints.hurl.notest delete mode 100644 test/ct/postgres/tests/xname/01-smd-add-redfish-endpoints.hurl delete mode 100644 test/ct/postgres/tests/xname/02-smd-get-components.hurl delete mode 100644 test/ct/postgres/tests/xname/03-smd-get-component-endpoints.hurl delete mode 100644 test/ct/postgres/tests/xname/04-bss-add-xnames.hurl delete mode 100644 test/ct/postgres/tests/xname/05-bss-delete-xname.hurl delete mode 100644 test/ct/postgres/tests/xname/06-bss-get-boot-script-xname1.hurl delete mode 100644 test/ct/postgres/tests/xname/07-bss-get-boot-script-xname2.hurl delete mode 100644 test/ct/postgres/tests/xname/08-bss-delete-by-boot-config.hurl delete mode 100644 test/ct/postgres/tests/xname/09-smd-delete-redfish-endpoints.hurl delete mode 100644 test/ct/postgres/tests/xname/10-smd-delete-components.hurl delete mode 100644 test/ct/postgres/tests/xname/11-smd-delete-component-endpoints.hurl diff --git a/Dockerfile.bss-debugger.Dockerfile b/Dockerfile.bss-debugger.Dockerfile deleted file mode 100644 index fcffa05..0000000 --- a/Dockerfile.bss-debugger.Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# MIT License -# -# (C) Copyright [2021] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Dockerfile for running postgres integration tests. - -### build-base stage ### -# Build base just has the packages installed we need. -FROM alpine:latest - -RUN apk add curl - -ENTRYPOINT ["/bin/sh"] diff --git a/Dockerfile.bss-postgres-test.Dockerfile b/Dockerfile.bss-postgres-test.Dockerfile deleted file mode 100644 index f1bb1b6..0000000 --- a/Dockerfile.bss-postgres-test.Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# MIT License -# -# (C) Copyright [2021] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Dockerfile for running postgres integration tests. - -### build-base stage ### -# Build base just has the packages installed we need. -FROM ghcr.io/orange-opensource/hurl:latest - -# Copy all the necessary files to the image. -COPY test/ct/postgres /postgres - -WORKDIR /postgres - -# Run unit tests. -ENTRYPOINT ["/postgres/run.sh"] diff --git a/docker-compose.bss-debugger.yaml b/docker-compose.bss-debugger.yaml deleted file mode 100644 index 057bc7c..0000000 --- a/docker-compose.bss-debugger.yaml +++ /dev/null @@ -1,122 +0,0 @@ -version: '3.7' - -networks: - bss: - smd: - -services: - postgres: - hostname: postgres - image: postgres:11-alpine - environment: - - POSTGRES_PASSWORD=ochamiuser - - POSTGRES_USER=ochamiuser - - POSTGRES_MULTIPLE_DATABASES=hmsds,bssdb - volumes: - - ./scripts/pg-init:/docker-entrypoint-initdb.d - ports: - - '5432:5432' - networks: - - bss - - smd - smd-init: - hostname: smd-init - image: ghcr.io/openchami/smd:v2.13.5 - environment: - - SMD_DBHOST=postgres - - SMD_DBPORT=5432 - - SMD_DBUSER=ochamiuser - - SMD_DBPASS=ochamiuser - - SMD_DBNAME=hmsds - - SMD_DBOPTS=sslmode=disable - depends_on: - - postgres - networks: - - smd - command: ["/smd-init"] - smd: - hostname: smd - image: ghcr.io/openchami/smd:v2.13.5 - environment: - - SMD_DBHOST=postgres - - SMD_DBPORT=5432 - - SMD_DBUSER=ochamiuser - - SMD_DBPASS=ochamiuser - - SMD_DBNAME=hmsds - - SMD_DBOPTS=sslmode=disable - depends_on: - - postgres - - smd-init - ports: - - '27779:27779' - networks: - - bss - - smd - bss-init: - hostname: bss-init - container_name: bss-init - build: - context: . - environment: - - BSS_POSTGRES=true - - BSS_INSECURE=true - - BSS_DBHOST=postgres - - BSS_DBPORT=5432 - - BSS_DBNAME=bssdb - - BSS_DBUSER=ochamiuser - - BSS_DBPASS=ochamiuser - depends_on: - - postgres - networks: - - bss - entrypoint: - - /usr/local/bin/bss-init - bss: - hostname: bss - environment: - - BSS_USESQL=true - - BSS_INSECURE=true - - BSS_DBHOST=postgres - - BSS_DBPORT=5432 - - BSS_DBNAME=bssdb - - BSS_DBUSER=ochamiuser - - BSS_DBPASS=ochamiuser - ports: - - '27778:27778' - build: - context: . - depends_on: - - postgres - - bss-init - - smd - networks: - - bss - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:27778/boot/v1"] - interval: 30s - timeout: 10s - retries: 5 - bss-test: - hostname: bss-test - build: - context: . - dockerfile: Dockerfile.bss-postgres-test.Dockerfile - depends_on: - bss: - condition: service_healthy - restart: true - networks: - - bss - bss-debugger: - image: alpine:latest - build: - context: . - dockerfile: Dockerfile.bss-debugger.Dockerfile - hostname: bss-debugger - depends_on: - - bss-test - networks: - - bss - entrypoint: "/bin/sh" - tty: true - stdin_open: true diff --git a/docker-compose.test.postgres.yaml b/docker-compose.test.postgres.yaml deleted file mode 100644 index d37aa97..0000000 --- a/docker-compose.test.postgres.yaml +++ /dev/null @@ -1,109 +0,0 @@ -version: '3.7' - -networks: - bss: - smd: - -services: - postgres: - hostname: postgres - image: postgres:11-alpine - environment: - - POSTGRES_PASSWORD=ochamiuser - - POSTGRES_USER=ochamiuser - - POSTGRES_MULTIPLE_DATABASES=hmsds,bssdb - volumes: - - ./scripts/pg-init:/docker-entrypoint-initdb.d - ports: - - '5432:5432' - networks: - - bss - - smd - smd-init: - hostname: smd-init - image: ghcr.io/openchami/smd:v2.13.5 - environment: - - SMD_DBHOST=postgres - - SMD_DBPORT=5432 - - SMD_DBUSER=ochamiuser - - SMD_DBPASS=ochamiuser - - SMD_DBNAME=hmsds - - SMD_DBOPTS=sslmode=disable - depends_on: - - postgres - networks: - - smd - command: ["/smd-init"] - smd: - hostname: smd - image: ghcr.io/openchami/smd:v2.13.5 - environment: - - SMD_DBHOST=postgres - - SMD_DBPORT=5432 - - SMD_DBUSER=ochamiuser - - SMD_DBPASS=ochamiuser - - SMD_DBNAME=hmsds - - SMD_DBOPTS=sslmode=disable - depends_on: - - postgres - - smd-init - ports: - - '27779:27779' - networks: - - bss - - smd - bss-init: - hostname: bss-init - container_name: bss-init - build: - context: . - environment: - - BSS_POSTGRES=true - - BSS_INSECURE=true - - BSS_DBHOST=postgres - - BSS_DBPORT=5432 - - BSS_DBNAME=bssdb - - BSS_DBUSER=ochamiuser - - BSS_DBPASS=ochamiuser - depends_on: - - postgres - networks: - - bss - entrypoint: - - /usr/local/bin/bss-init - bss: - hostname: bss - environment: - - BSS_USESQL=true - - BSS_INSECURE=true - - BSS_DBHOST=postgres - - BSS_DBPORT=5432 - - BSS_DBNAME=bssdb - - BSS_DBUSER=ochamiuser - - BSS_DBPASS=ochamiuser - ports: - - '27778:27778' - build: - context: . - depends_on: - - postgres - - bss-init - - smd - networks: - - bss - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:27778/boot/v1"] - interval: 30s - timeout: 10s - retries: 5 - bss-test: - hostname: bss-test - build: - context: . - dockerfile: Dockerfile.bss-postgres-test.Dockerfile - depends_on: - bss: - condition: service_healthy - restart: true - networks: - - bss diff --git a/runBssDebugger.sh b/runBssDebugger.sh deleted file mode 100755 index 886faa0..0000000 --- a/runBssDebugger.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash - -# -# MIT License -# -# (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -usage() { - echo "Usage: $0 [-hn]" - echo " -h Print this help message." - echo " -n Pass --no-cache to docker-compose build." -} - -nocache=false -while getopts 'hn' opt; do - case "${opt}" in - h) - usage - ;; - n) - nocache=true - ;; - *) - usage >&2 - ;; - esac -done - -set -x - -# Configure docker compose -export COMPOSE_PROJECT_NAME=$RANDOM -export COMPOSE_FILE=docker-compose.bss-debugger.yaml - -echo "COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME}" -echo "COMPOSE_FILE: ${COMPOSE_FILE}" - - -function cleanup() { - docker-compose down - if ! [[ $? -eq 0 ]]; then - echo "Failed to decompose environment!" - exit 1 - fi - exit $1 -} - - -echo "Starting containers..." -if [ "${nocache}" = true ]; then - docker-compose build --no-cache -else - docker-compose build -fi -docker-compose up --detach bss-debugger - -test_result=$? - -docker attach --sig-proxy=false ${COMPOSE_PROJECT_NAME}-bss-debugger-1 - -# Clean up -echo "Cleaning up containers..." -if [[ $test_result -ne 0 ]]; then - echo "Unit tests FAILED!" - cleanup 1 -fi - -echo "Unit tests PASSED!" -cleanup 0 diff --git a/runPostgresTest.sh b/runPostgresTest.sh deleted file mode 100755 index 75fbd2b..0000000 --- a/runPostgresTest.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash - -# -# MIT License -# -# (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -usage() { - echo "Usage: $0 [-hn]" - echo " -h Print this help message." - echo " -n Pass --no-cache to docker-compose build." -} - -nocache=false -while getopts 'hn' opt; do - case "${opt}" in - h) - usage - ;; - n) - nocache=true - ;; - *) - usage >&2 - ;; - esac -done - -set -x - -# Configure docker compose -export COMPOSE_PROJECT_NAME=$RANDOM -export COMPOSE_FILE=docker-compose.test.postgres.yaml - -echo "COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME}" -echo "COMPOSE_FILE: ${COMPOSE_FILE}" - - -function cleanup() { - docker-compose down - if ! [[ $? -eq 0 ]]; then - echo "Failed to decompose environment!" - exit 1 - fi - exit $1 -} - - -echo "Starting containers..." -if [ "${nocache}" = true ]; then - docker-compose build --no-cache -else - docker-compose build -fi -docker-compose up --exit-code-from bss-test bss-test - -test_result=$? - -# Clean up -echo "Cleaning up containers..." -if [[ $test_result -ne 0 ]]; then - echo "Unit tests FAILED!" - cleanup 1 -fi - -echo "Unit tests PASSED!" -cleanup 0 diff --git a/test/ct/postgres/run.sh b/test/ct/postgres/run.sh deleted file mode 100755 index 24916cd..0000000 --- a/test/ct/postgres/run.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Run all integration tests. - -set -e - -# Test add/delete/get boot config by XName. -echo '====================================' -echo 'EXECUTING xname INTEGRATION TESTS...' -echo '====================================' -/usr/bin/hurl --test "$(dirname $0)"/tests/xname/*.hurl - -# Test add/delete/get boot config by MAC address. -echo '====================================' -echo 'EXECUTING mac INTEGRATION TESTS...' -echo '====================================' -/usr/bin/hurl --test "$(dirname $0)"/tests/mac/*.hurl - -# The version of SMD we are using does not support updating/displaying -# NIDs, even though BSS can generate a boot script by NID. Since BSS -# checks SMD to see if a node exists via its NID for this test, it will -# fail. Therefore, this test is commented out for now until SMD handles -# NIDs correctly. -## Test add/delete/get boot config by NID. -#echo '====================================' -#echo 'EXECUTING mac INTEGRATION TESTS...' -#echo '====================================' -#/usr/bin/hurl --test "$(dirname $0)"/tests/nid/*.hurl - -echo '====================================' -echo 'ALL INTEGRATION TESTS COMPLETED' -echo '====================================' diff --git a/test/ct/postgres/tests/mac/01-smd-add-redfish-endpoints.hurl b/test/ct/postgres/tests/mac/01-smd-add-redfish-endpoints.hurl deleted file mode 100644 index 3479278..0000000 --- a/test/ct/postgres/tests/mac/01-smd-add-redfish-endpoints.hurl +++ /dev/null @@ -1,1471 +0,0 @@ -# Create SMD Redfish endpoints for first xname. -POST http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -{ - "ID": "x0c0s1b0", - "Name": "x0c0s1b0", - "Hostname": "x0c0s1b0", - "FQDN": "", - "User": "admin", - "Password": "password", - "MACRequired": true, - "RediscoverOnUpdate": false, - "MACAddr": "ae:12:e2:ff:89:9d", - "IPAddress": "10.254.2.10", - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/x0c0s1b0", - "Id": "x0c0s1b0", - "Name": "x0c0s1b0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Card", - "DepthMm": 0, - "Description": "SS11 200Gb 2P NIC Mezz", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "R4K44A", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "On", - "SKU": "", - "SerialNumber": "TII0542809843", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/Enclosure", - "Id": "Enclosure", - "Name": "Enclosure", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Enclosure", - "DepthMm": 0, - "Description": "BardPeakNC", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "BardPeakNC", - "PartNumber": "P37085-001.A", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/x0c0s1b0n0", - "Id": "x0c0s1b0n0", - "Name": "x0c0s1b0n0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Blade", - "DepthMm": 0, - "Description": "", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - } - ], - "Systems": [ - { - "Data": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0", - "Id": "x0c0s1b0n0", - "@odata.context": "", - "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", - "AssetTag": "", - "BiosVersion": "ex235a.bios-1.3.6", - "Boot": { - "BootOrder": [ - "ME0-PXE-IP4", - "ME0-PXE-IP6", - "HSN0-PXE-IP4", - "HSN0-PXE-IP6", - "HSN1-PXE-IP4", - "HSN1-PXE-IP6", - "HSN2-PXE-IP4", - "HSN3-PXE-IP4", - "HSN2-PXE-IP6", - "HSN3-PXE-IP6", - "Boot000B" - ] - }, - "Description": "BardPeakNC", - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "" - }, - "TimeoutAction": "", - "WarningAction": "" - }, - "HostingRoles": null, - "IndicatorLED": "", - "Manufacturer": "HPE", - "MemorySummary": { - "MemoryMirroring": "", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "TotalSystemMemoryGiB": 512, - "TotalSystemPersistentMemoryGiB": 0 - }, - "Model": "HPE CRAY EX235a", - "Name": "x0c0s1b0n0", - "PCIeDevices@odata.count": 0, - "PCIeFunctions@odata.count": 0, - "PartNumber": "P37085-001.A", - "PowerRestorePolicy": "", - "PowerState": "On", - "ProcessorSummary": { - "Count": 9, - "LogicalProcessorCount": 0, - "Model": "AMD INSTINCT MI200 (MCM) OAM LC", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - } - }, - "Redundancy": "", - "Redundancy@odata.count": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "SubModel": "", - "SystemType": "Physical", - "TrustedModules": null, - "UUID": "", - "SupportedResetTypes": null, - "ManagedBy": null - }, - "EthernetInterfaces": [ - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet2", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/ManagementEthernet", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "Node Maintenance Network", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "ManagementEthernet", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "02:0b:b8:00:30:00", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": null, - "PermanentMACAddress": "02:0b:b8:00:30:00", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet1", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet3", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet0", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "Enabled" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - } - ] - } - ] -} - -HTTP 201 -Content-Type: application/json -[Asserts] -jsonpath "$[0].URI" == "/hsm/v2/Inventory/RedfishEndpoints/x0c0s1b0" - -# Create SMD Redfish endpoints for third xname (the second will be deleted). -POST http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -{ - "ID": "x0c0s3b0", - "Name": "x0c0s3b0", - "Hostname": "x0c0s3b0", - "FQDN": "", - "User": "admin", - "Password": "password", - "MACRequired": true, - "RediscoverOnUpdate": false, - "MACAddr": "ae:12:e2:ff:89:9e", - "IPAddress": "10.254.2.11", - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/x0c0s3b0", - "Id": "x0c0s3b0", - "Name": "x0c0s3b0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Card", - "DepthMm": 0, - "Description": "SS11 200Gb 2P NIC Mezz", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "R4K44A", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "On", - "SKU": "", - "SerialNumber": "TII0542809843", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/Enclosure", - "Id": "Enclosure", - "Name": "Enclosure", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Enclosure", - "DepthMm": 0, - "Description": "BardPeakNC", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "BardPeakNC", - "PartNumber": "P37085-001.A", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/x0c0s3b0n0", - "Id": "x0c0s3b0n0", - "Name": "x0c0s3b0n0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Blade", - "DepthMm": 0, - "Description": "", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - } - ], - "Systems": [ - { - "Data": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0", - "Id": "x0c0s3b0n0", - "@odata.context": "", - "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", - "AssetTag": "", - "BiosVersion": "ex235a.bios-1.3.6", - "Boot": { - "BootOrder": [ - "ME0-PXE-IP4", - "ME0-PXE-IP6", - "HSN0-PXE-IP4", - "HSN0-PXE-IP6", - "HSN1-PXE-IP4", - "HSN1-PXE-IP6", - "HSN2-PXE-IP4", - "HSN3-PXE-IP4", - "HSN2-PXE-IP6", - "HSN3-PXE-IP6", - "Boot000B" - ] - }, - "Description": "BardPeakNC", - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "" - }, - "TimeoutAction": "", - "WarningAction": "" - }, - "HostingRoles": null, - "IndicatorLED": "", - "Manufacturer": "HPE", - "MemorySummary": { - "MemoryMirroring": "", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "TotalSystemMemoryGiB": 512, - "TotalSystemPersistentMemoryGiB": 0 - }, - "Model": "HPE CRAY EX235a", - "Name": "x0c0s3b0n0", - "PCIeDevices@odata.count": 0, - "PCIeFunctions@odata.count": 0, - "PartNumber": "P37085-001.A", - "PowerRestorePolicy": "", - "PowerState": "On", - "ProcessorSummary": { - "Count": 9, - "LogicalProcessorCount": 0, - "Model": "AMD INSTINCT MI200 (MCM) OAM LC", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - } - }, - "Redundancy": "", - "Redundancy@odata.count": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "SubModel": "", - "SystemType": "Physical", - "TrustedModules": null, - "UUID": "", - "SupportedResetTypes": null, - "ManagedBy": null - }, - "EthernetInterfaces": [ - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet2", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/ManagementEthernet", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "Node Maintenance Network", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "ManagementEthernet", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "02:0b:b8:00:30:04", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": null, - "PermanentMACAddress": "02:0b:b8:00:30:04", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet1", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet3", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet0", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "Enabled" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - } - ] - } - ] -} - -HTTP 201 -Content-Type: application/json -[Asserts] -jsonpath "$[0].URI" == "/hsm/v2/Inventory/RedfishEndpoints/x0c0s3b0" - -# Get RedfishEndpoints we just added. -GET http://smd:27779/hsm/v2/Inventory/RedfishEndpoints - -# Response should be: -# -# { -# "RedfishEndpoints": [ -# { -# "ID": "x0c0s1b0", -# "Type": "NodeBMC", -# "Name": "x0c0s1b0", -# "Hostname": "x0c0s1b0", -# "Domain": "", -# "FQDN": "x0c0s1b0", -# "Enabled": true, -# "User": "admin", -# "Password": "password", -# "MACRequired": true, -# "MACAddr": "ae:12:e2:ff:89:9d", -# "IPAddress": "10.254.2.10", -# "RediscoverOnUpdate": false, -# "DiscoveryInfo": { -# "LastDiscoveryStatus": "NotYetQueried" -# } -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "NodeBMC", -# "Name": "x0c0s3b0", -# "Hostname": "x0c0s3b0", -# "Domain": "", -# "FQDN": "x0c0s3b0", -# "Enabled": true, -# "User": "admin", -# "Password": "password", -# "MACRequired": true, -# "MACAddr": "ae:12:e2:ff:89:9e", -# "IPAddress": "10.254.2.11", -# "RediscoverOnUpdate": false, -# "DiscoveryInfo": { -# "LastDiscoveryStatus": "NotYetQueried" -# } -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.RedfishEndpoints" count == 2 -jsonpath "$.RedfishEndpoints[*].ID" includes "x0c0s1b0" -jsonpath "$.RedfishEndpoints[*].ID" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].Hostname" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].Hostname" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].MACAddr" includes "ae:12:e2:ff:89:9d" -jsonpath "$.RedfishEndpoints[*].MACAddr" includes "ae:12:e2:ff:89:9e" -jsonpath "$.RedfishEndpoints[*].IPAddress" includes "10.254.2.10" -jsonpath "$.RedfishEndpoints[*].IPAddress" includes "10.254.2.11" -jsonpath "$.RedfishEndpoints[0].RediscoverOnUpdate" == false -jsonpath "$.RedfishEndpoints[1].RediscoverOnUpdate" == false diff --git a/test/ct/postgres/tests/mac/02-smd-get-components.hurl b/test/ct/postgres/tests/mac/02-smd-get-components.hurl deleted file mode 100644 index 77dcb3c..0000000 --- a/test/ct/postgres/tests/mac/02-smd-get-components.hurl +++ /dev/null @@ -1,28 +0,0 @@ -# Get list of Components. -GET http://smd:27779/hsm/v2/State/Components - -# Response should be: -# -# { -# "Components": [ -# { -# "ID": "x0c0s1b0", -# "Type": "Node", -# "Enabled": false -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "Node", -# "Enabled": false -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.Components[*].ID" includes "x0c0s1b0" -jsonpath "$.Components[*].ID" includes "x0c0s3b0" -jsonpath "$.Components[0].Type" == "Node" -jsonpath "$.Components[0].Enabled" == true -jsonpath "$.Components[1].Type" == "Node" -jsonpath "$.Components[1].Enabled" == true diff --git a/test/ct/postgres/tests/mac/03-smd-get-component-endpoints.hurl b/test/ct/postgres/tests/mac/03-smd-get-component-endpoints.hurl deleted file mode 100644 index 90a1c06..0000000 --- a/test/ct/postgres/tests/mac/03-smd-get-component-endpoints.hurl +++ /dev/null @@ -1,109 +0,0 @@ -# Get list of ComponentEndpoints. -GET http://smd:27779/hsm/v2/Inventory/ComponentEndpoints - -# Response should be: -# -# { -# "ComponentEndpoints": [ -# { -# "ID": "x0c0s1b0", -# "Type": "Node", -# "RedfishType": "ComputerSystem", -# "RedfishSubtype": "Physical", -# "OdataID": "", -# "RedfishEndpointID": "x0c0s1b0", -# "Enabled": true, -# "RedfishEndpointFQDN": "x0c0s1b0", -# "RedfishURL": "x0c0s1b0", -# "ComponentEndpointType": "ComponentEndpointComputerSystem", -# "RedfishSystemInfo": { -# "EthernetNICInfo": [ -# { -# "RedfishId": "HPCNet2", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "ManagementEthernet", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/ManagementEthernet", -# "Description": "Node Maintenance Network", -# "MACAddress": "02:0b:b8:00:30:00" -# }, -# { -# "RedfishId": "HPCNet1", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet3", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet0", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# } -# ] -# } -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "Node", -# "RedfishType": "ComputerSystem", -# "RedfishSubtype": "Physical", -# "OdataID": "", -# "RedfishEndpointID": "x0c0s3b0", -# "Enabled": true, -# "RedfishEndpointFQDN": "x0c0s3b0", -# "RedfishURL": "x0c0s3b0", -# "ComponentEndpointType": "ComponentEndpointComputerSystem", -# "RedfishSystemInfo": { -# "EthernetNICInfo": [ -# { -# "RedfishId": "HPCNet2", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "ManagementEthernet", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/ManagementEthernet", -# "Description": "Node Maintenance Network", -# "MACAddress": "02:0b:b8:00:30:04" -# }, -# { -# "RedfishId": "HPCNet1", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet3", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet0", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# } -# ] -# } -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.ComponentEndpoints" count == 2 -jsonpath "$.ComponentEndpoints[*].ID" includes "x0c0s1b0" -jsonpath "$.ComponentEndpoints[*].ID" includes "x0c0s3b0" -jsonpath "$.ComponentEndpoints[0].Type" == "Node" -jsonpath "$.ComponentEndpoints[1].Type" == "Node" diff --git a/test/ct/postgres/tests/mac/04-bss-add-macs.hurl b/test/ct/postgres/tests/mac/04-bss-add-macs.hurl deleted file mode 100644 index be7a822..0000000 --- a/test/ct/postgres/tests/mac/04-bss-add-macs.hurl +++ /dev/null @@ -1,62 +0,0 @@ -# Add two MAC addresses to BSS. -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri2.tld", - "initrd": "https://testinitrduri2.tld", - "macs": ["02:0b:b8:00:30:00", "02:0b:b8:00:30:02"], - "params": "param3,param4" -} - -HTTP 201 - -# Add another MAC address to BSS (to see if same boot config got used instead of -# creating another). Also, use an upper-case MAC address. BSS should store this -# as lower case. -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri2.tld", - "initrd": "https://testinitrduri2.tld", - "macs": ["02:0B:B8:00:30:04"], - "params": "param3,param4" -} - -HTTP 201 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "macs": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:02", -# "02:0b:b8:00:30:04" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].macs" count == 3 -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:00" -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:02" -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:04" -jsonpath "$[0].params" == "param3,param4" -jsonpath "$[0].kernel" == "https://testkerneluri2.tld" -jsonpath "$[0].initrd" == "https://testinitrduri2.tld" diff --git a/test/ct/postgres/tests/mac/05-bss-add-duplicate-mac.hurl b/test/ct/postgres/tests/mac/05-bss-add-duplicate-mac.hurl deleted file mode 100644 index 3764921..0000000 --- a/test/ct/postgres/tests/mac/05-bss-add-duplicate-mac.hurl +++ /dev/null @@ -1,51 +0,0 @@ -# Try to add a duplicate MAC address using upper case. This should not add anything. -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri0.tld", - "initrd": "https://testinitrduri0.tld", - "macs": ["02:0B:B8:00:30:04"], - "params": "param0" -} - -HTTP 400 -[Asserts] -jsonpath "$.detail" == "Bad Request: postgres.Add: No nodes to add (possible duplicate(s))" - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "macs": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:02", -# "02:0b:b8:00:30:04" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].macs" count == 3 -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:00" -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:02" -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:04" -jsonpath "$[0].params" == "param3,param4" -jsonpath "$[0].kernel" == "https://testkerneluri2.tld" -jsonpath "$[0].initrd" == "https://testinitrduri2.tld" diff --git a/test/ct/postgres/tests/mac/05-bss-update-empty.hurl b/test/ct/postgres/tests/mac/05-bss-update-empty.hurl deleted file mode 100644 index 22cbe9c..0000000 --- a/test/ct/postgres/tests/mac/05-bss-update-empty.hurl +++ /dev/null @@ -1,7 +0,0 @@ -# Testing erring when no new parameters are passed. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:02"] -} - -HTTP 404 diff --git a/test/ct/postgres/tests/mac/06-bss-update-nonexistant-mac.hurl b/test/ct/postgres/tests/mac/06-bss-update-nonexistant-mac.hurl deleted file mode 100644 index 7a74faa..0000000 --- a/test/ct/postgres/tests/mac/06-bss-update-nonexistant-mac.hurl +++ /dev/null @@ -1,8 +0,0 @@ -# Testing erring when specifying MAC address that doesn't exist. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:ff"], - "params": "param1 param2" -} - -HTTP 404 diff --git a/test/ct/postgres/tests/mac/07-bss-update-mixed-mac.hurl b/test/ct/postgres/tests/mac/07-bss-update-mixed-mac.hurl deleted file mode 100644 index 819499c..0000000 --- a/test/ct/postgres/tests/mac/07-bss-update-mixed-mac.hurl +++ /dev/null @@ -1,9 +0,0 @@ -# Testing erring when specifying a mix of a MAC address that doesn't exist -# and a MAC address that does exist. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:ff", "02:0b:b8:00:30:02"], - "params": "param1 param2" -} - -HTTP 404 diff --git a/test/ct/postgres/tests/mac/08-bss-update-params.hurl b/test/ct/postgres/tests/mac/08-bss-update-params.hurl deleted file mode 100644 index 1ddc8e3..0000000 --- a/test/ct/postgres/tests/mac/08-bss-update-params.hurl +++ /dev/null @@ -1,69 +0,0 @@ -# Test updating kernel parameters for existing MAC address. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:02"], - "params": "param3 param4" -} - -HTTP 200 - -# There should be two separate BootParams entries. -GET http://bss:27778/boot/v1/bootparameters - -HTTP 200 -[Asserts] -jsonpath "$" count == 2 - -# Verify that update occurred. -GET http://bss:27778/boot/v1/bootparameters?mac=02:0b:b8:00:30:02 - -# Response should be: -# -# [ -# { -# "macs": [ -# "02:0b:b8:00:30:02" -# ], -# "params": "param3 param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# }, -# { -# "macs": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:04" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -[Asserts] -jsonpath "$[0].macs" count == 1 -jsonpath "$[0].macs[0]" == "02:0b:b8:00:30:02" -jsonpath "$[0].params" == "param3 param4" diff --git a/test/ct/postgres/tests/mac/09-bss-update-kernel-initrd.hurl b/test/ct/postgres/tests/mac/09-bss-update-kernel-initrd.hurl deleted file mode 100644 index cd2b555..0000000 --- a/test/ct/postgres/tests/mac/09-bss-update-kernel-initrd.hurl +++ /dev/null @@ -1,72 +0,0 @@ -# Test updating kernel/initrd URI for existing MAC address. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:02"], - "kernel": "https://testkerneluri3.tld", - "initrd": "https://testinitrduri3.tld" -} - -HTTP 200 - -# There should still be two separate BootParams entries. -GET http://bss:27778/boot/v1/bootparameters - -HTTP 200 -[Asserts] -jsonpath "$" count == 2 - -# Verify that update occurred. -GET http://bss:27778/boot/v1/bootparameters?mac=02:0b:b8:00:30:02 - -# Response should be: -# -# [ -# { -# "macs": [ -# "02:0b:b8:00:30:02" -# ], -# "params": "param3 param4", -# "kernel": "https://testkerneluri3.tld", -# "initrd": "https://testinitrduri3.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# }, -# { -# "macs": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:04" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -[Asserts] -jsonpath "$[0].macs" count == 1 -jsonpath "$[0].macs[0]" == "02:0b:b8:00:30:02" -jsonpath "$[0].params" == "param3 param4" -jsonpath "$[0].kernel" == "https://testkerneluri3.tld" -jsonpath "$[0].initrd" == "https://testinitrduri3.tld" diff --git a/test/ct/postgres/tests/mac/10-bss-update-reset.hurl b/test/ct/postgres/tests/mac/10-bss-update-reset.hurl deleted file mode 100644 index a22d584..0000000 --- a/test/ct/postgres/tests/mac/10-bss-update-reset.hurl +++ /dev/null @@ -1,54 +0,0 @@ -# Test updating kernel/initrd URI for existing MAC address. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:02"], - "kernel": "https://testkerneluri2.tld", - "initrd": "https://testinitrduri2.tld", - "params": "param3,param4" -} - -HTTP 200 - -# There should now be only one BootParams entry. -GET http://bss:27778/boot/v1/bootparameters - -HTTP 200 -[Asserts] -jsonpath "$" count == 1 - -# Verify that update occurred. -GET http://bss:27778/boot/v1/bootparameters?mac=02:0b:b8:00:30:02 - -# Response should be: -# -# [ -# { -# "macs": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:04", -# "02:0b:b8:00:30:02" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -[Asserts] -jsonpath "$[0].macs" count == 1 -jsonpath "$[0].macs[0]" == "02:0b:b8:00:30:02" -jsonpath "$[0].params" == "param3,param4" -jsonpath "$[0].kernel" == "https://testkerneluri2.tld" -jsonpath "$[0].initrd" == "https://testinitrduri2.tld" diff --git a/test/ct/postgres/tests/mac/11-bss-update-duplicate.hurl b/test/ct/postgres/tests/mac/11-bss-update-duplicate.hurl deleted file mode 100644 index a0fa63f..0000000 --- a/test/ct/postgres/tests/mac/11-bss-update-duplicate.hurl +++ /dev/null @@ -1,54 +0,0 @@ -# Test attempting to update a duplicate config for existing MAC address. -PATCH http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:02"], - "kernel": "https://testkerneluri2.tld", - "initrd": "https://testinitrduri2.tld", - "params": "param3,param4" -} - -HTTP 200 - -# There should still be only one BootParams entry. -GET http://bss:27778/boot/v1/bootparameters - -HTTP 200 -[Asserts] -jsonpath "$" count == 1 - -# Verify that update occurred. -GET http://bss:27778/boot/v1/bootparameters?mac=02:0b:b8:00:30:02 - -# Response should be: -# -# [ -# { -# "macs": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:04", -# "02:0b:b8:00:30:02" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -[Asserts] -jsonpath "$[0].macs" count == 1 -jsonpath "$[0].macs[0]" == "02:0b:b8:00:30:02" -jsonpath "$[0].params" == "param3,param4" -jsonpath "$[0].kernel" == "https://testkerneluri2.tld" -jsonpath "$[0].initrd" == "https://testinitrduri2.tld" diff --git a/test/ct/postgres/tests/mac/12-bss-delete-mac.hurl b/test/ct/postgres/tests/mac/12-bss-delete-mac.hurl deleted file mode 100644 index afc582d..0000000 --- a/test/ct/postgres/tests/mac/12-bss-delete-mac.hurl +++ /dev/null @@ -1,44 +0,0 @@ -# Delete a MAC address. -DELETE http://bss:27778/boot/v1/bootparameters -{ - "macs": ["02:0b:b8:00:30:02"] -} - -HTTP 200 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "hosts": [ -# "02:0b:b8:00:30:00", -# "02:0b:b8:00:30:04" -# ], -# "params": "param3,param4", -# "kernel": "https://testkerneluri2.tld", -# "initrd": "https://testinitrduri2.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].macs" count == 2 -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:00" -jsonpath "$[0].macs[*]" includes "02:0b:b8:00:30:04" -jsonpath "$[0].params" == "param3,param4" -jsonpath "$[0].kernel" == "https://testkerneluri2.tld" -jsonpath "$[0].initrd" == "https://testinitrduri2.tld" diff --git a/test/ct/postgres/tests/mac/13-bss-get-boot-script-mac1.hurl b/test/ct/postgres/tests/mac/13-bss-get-boot-script-mac1.hurl deleted file mode 100644 index 694bd23..0000000 --- a/test/ct/postgres/tests/mac/13-bss-get-boot-script-mac1.hurl +++ /dev/null @@ -1,22 +0,0 @@ -# Generate a boot script for first MAC address and return it. -GET http://bss:27778/boot/v1/bootscript?mac=02:0b:b8:00:30:00 - -# Response should be (trailing newline included): -# -# #!ipxe -# kernel --name kernel https://testkerneluri2.tld initrd=initrd param3,param4 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry -# initrd --name initrd https://testinitrduri2.tld || goto boot_retry -# boot || goto boot_retry -# :boot_retry -# sleep 30 -# chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:00&retry=1 -# -HTTP 200 -[Asserts] -body contains "#!ipxe" -body contains "kernel --name kernel https://testkerneluri2.tld initrd=initrd param3,param4 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry" -body contains "initrd --name initrd https://testinitrduri2.tld || goto boot_retry" -body contains "boot || goto boot_retry" -body contains ":boot_retry" -body contains "sleep 30" -body contains "chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:00&retry=1" diff --git a/test/ct/postgres/tests/mac/14-bss-get-boot-script-mac2.hurl b/test/ct/postgres/tests/mac/14-bss-get-boot-script-mac2.hurl deleted file mode 100644 index 1feb11e..0000000 --- a/test/ct/postgres/tests/mac/14-bss-get-boot-script-mac2.hurl +++ /dev/null @@ -1,22 +0,0 @@ -# Generate a boot script for third MAC address (second was deleted) and return it. -GET http://bss:27778/boot/v1/bootscript?mac=02:0b:b8:00:30:04 - -# Response should be (trailing newline included): -# -# #!ipxe -# kernel --name kernel https://testkerneluri2.tld initrd=initrd param3,param4 xname=x0c0s3b0 ds=nocloud-net;s=localhost/ || goto boot_retry -# initrd --name initrd https://testinitrduri2.tld || goto boot_retry -# boot || goto boot_retry -# :boot_retry -# sleep 30 -# chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:04&retry=1 -# -HTTP 200 -[Asserts] -body contains "#!ipxe" -body contains "kernel --name kernel https://testkerneluri2.tld initrd=initrd param3,param4 xname=x0c0s3b0 ds=nocloud-net;s=localhost/ || goto boot_retry" -body contains "initrd --name initrd https://testinitrduri2.tld || goto boot_retry" -body contains "boot || goto boot_retry" -body contains ":boot_retry" -body contains "sleep 30" -body contains "chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:04&retry=1" diff --git a/test/ct/postgres/tests/mac/15-bss-delete-by-boot-config.hurl b/test/ct/postgres/tests/mac/15-bss-delete-by-boot-config.hurl deleted file mode 100644 index ed7dd09..0000000 --- a/test/ct/postgres/tests/mac/15-bss-delete-by-boot-config.hurl +++ /dev/null @@ -1,18 +0,0 @@ -# Delete everything (by boot config). -DELETE http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri2.tld", - "initrd": "https://testinitrduri2.tld", - "params": "param3,param4" -} - -HTTP 200 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be null, since all of the boot configs, boot groups, -# and nodes should have been deleted. -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$" == null diff --git a/test/ct/postgres/tests/mac/16-smd-delete-redfish-endpoints.hurl b/test/ct/postgres/tests/mac/16-smd-delete-redfish-endpoints.hurl deleted file mode 100644 index 6959bba..0000000 --- a/test/ct/postgres/tests/mac/16-smd-delete-redfish-endpoints.hurl +++ /dev/null @@ -1,16 +0,0 @@ -# Delete RedfishEndpoint for first XName. -DELETE http://smd:27779/hsm/v2/Inventory/RedfishEndpoints/x0c0s1b0 - -HTTP 200 - -# Delete RedfishEndpoint for third XName. -DELETE http://smd:27779/hsm/v2/Inventory/RedfishEndpoints/x0c0s3b0 - -HTTP 200 - -# Get RedfishEndpoints (should be empty). -GET http://smd:27779/hsm/v2/Inventory/RedfishEndpoints - -HTTP 200 -[Asserts] -jsonpath "$.RedfishEndpoints" count == 0 diff --git a/test/ct/postgres/tests/mac/17-smd-delete-components.hurl b/test/ct/postgres/tests/mac/17-smd-delete-components.hurl deleted file mode 100644 index b88557e..0000000 --- a/test/ct/postgres/tests/mac/17-smd-delete-components.hurl +++ /dev/null @@ -1,16 +0,0 @@ -# Delete Component for first XName. -DELETE http://smd:27779/hsm/v2/State/Components/x0c0s1b0 - -HTTP 200 - -# Delete Component for third XName. -DELETE http://smd:27779/hsm/v2/State/Components/x0c0s3b0 - -HTTP 200 - -# Get Components (should be empty). -GET http://smd:27779/hsm/v2/State/Components - -HTTP 200 -[Asserts] -jsonpath "$.Components" count == 0 diff --git a/test/ct/postgres/tests/mac/18-smd-delete-component-endpoints.hurl b/test/ct/postgres/tests/mac/18-smd-delete-component-endpoints.hurl deleted file mode 100644 index 06a1ced..0000000 --- a/test/ct/postgres/tests/mac/18-smd-delete-component-endpoints.hurl +++ /dev/null @@ -1,16 +0,0 @@ -## Delete ComponentEndpoint for first XName. -#DELETE http://smd:27779/hsm/v2/Inventory/ComponentEndpoints/x0c0s1b0 -# -#HTTP 200 -# -## Delete ComponentEndpoint for third XName. -#DELETE http://smd:27779/hsm/v2/Inventory/ComponentEndpoints/x0c0s3b0 -# -#HTTP 200 - -# Get ComponentEndpoints (should be empty). -GET http://smd:27779/hsm/v2/Inventory/ComponentEndpoints - -HTTP 200 -[Asserts] -jsonpath "$.ComponentEndpoints" count == 0 diff --git a/test/ct/postgres/tests/nid/01-smd-add-redfish-endpoints.hurl b/test/ct/postgres/tests/nid/01-smd-add-redfish-endpoints.hurl deleted file mode 100644 index 3479278..0000000 --- a/test/ct/postgres/tests/nid/01-smd-add-redfish-endpoints.hurl +++ /dev/null @@ -1,1471 +0,0 @@ -# Create SMD Redfish endpoints for first xname. -POST http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -{ - "ID": "x0c0s1b0", - "Name": "x0c0s1b0", - "Hostname": "x0c0s1b0", - "FQDN": "", - "User": "admin", - "Password": "password", - "MACRequired": true, - "RediscoverOnUpdate": false, - "MACAddr": "ae:12:e2:ff:89:9d", - "IPAddress": "10.254.2.10", - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/x0c0s1b0", - "Id": "x0c0s1b0", - "Name": "x0c0s1b0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Card", - "DepthMm": 0, - "Description": "SS11 200Gb 2P NIC Mezz", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "R4K44A", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "On", - "SKU": "", - "SerialNumber": "TII0542809843", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/Enclosure", - "Id": "Enclosure", - "Name": "Enclosure", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Enclosure", - "DepthMm": 0, - "Description": "BardPeakNC", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "BardPeakNC", - "PartNumber": "P37085-001.A", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/x0c0s1b0n0", - "Id": "x0c0s1b0n0", - "Name": "x0c0s1b0n0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Blade", - "DepthMm": 0, - "Description": "", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - } - ], - "Systems": [ - { - "Data": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0", - "Id": "x0c0s1b0n0", - "@odata.context": "", - "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", - "AssetTag": "", - "BiosVersion": "ex235a.bios-1.3.6", - "Boot": { - "BootOrder": [ - "ME0-PXE-IP4", - "ME0-PXE-IP6", - "HSN0-PXE-IP4", - "HSN0-PXE-IP6", - "HSN1-PXE-IP4", - "HSN1-PXE-IP6", - "HSN2-PXE-IP4", - "HSN3-PXE-IP4", - "HSN2-PXE-IP6", - "HSN3-PXE-IP6", - "Boot000B" - ] - }, - "Description": "BardPeakNC", - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "" - }, - "TimeoutAction": "", - "WarningAction": "" - }, - "HostingRoles": null, - "IndicatorLED": "", - "Manufacturer": "HPE", - "MemorySummary": { - "MemoryMirroring": "", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "TotalSystemMemoryGiB": 512, - "TotalSystemPersistentMemoryGiB": 0 - }, - "Model": "HPE CRAY EX235a", - "Name": "x0c0s1b0n0", - "PCIeDevices@odata.count": 0, - "PCIeFunctions@odata.count": 0, - "PartNumber": "P37085-001.A", - "PowerRestorePolicy": "", - "PowerState": "On", - "ProcessorSummary": { - "Count": 9, - "LogicalProcessorCount": 0, - "Model": "AMD INSTINCT MI200 (MCM) OAM LC", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - } - }, - "Redundancy": "", - "Redundancy@odata.count": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "SubModel": "", - "SystemType": "Physical", - "TrustedModules": null, - "UUID": "", - "SupportedResetTypes": null, - "ManagedBy": null - }, - "EthernetInterfaces": [ - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet2", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/ManagementEthernet", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "Node Maintenance Network", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "ManagementEthernet", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "02:0b:b8:00:30:00", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": null, - "PermanentMACAddress": "02:0b:b8:00:30:00", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet1", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet3", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet0", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "Enabled" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - } - ] - } - ] -} - -HTTP 201 -Content-Type: application/json -[Asserts] -jsonpath "$[0].URI" == "/hsm/v2/Inventory/RedfishEndpoints/x0c0s1b0" - -# Create SMD Redfish endpoints for third xname (the second will be deleted). -POST http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -{ - "ID": "x0c0s3b0", - "Name": "x0c0s3b0", - "Hostname": "x0c0s3b0", - "FQDN": "", - "User": "admin", - "Password": "password", - "MACRequired": true, - "RediscoverOnUpdate": false, - "MACAddr": "ae:12:e2:ff:89:9e", - "IPAddress": "10.254.2.11", - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/x0c0s3b0", - "Id": "x0c0s3b0", - "Name": "x0c0s3b0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Card", - "DepthMm": 0, - "Description": "SS11 200Gb 2P NIC Mezz", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "R4K44A", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "On", - "SKU": "", - "SerialNumber": "TII0542809843", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/Enclosure", - "Id": "Enclosure", - "Name": "Enclosure", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Enclosure", - "DepthMm": 0, - "Description": "BardPeakNC", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "BardPeakNC", - "PartNumber": "P37085-001.A", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/x0c0s3b0n0", - "Id": "x0c0s3b0n0", - "Name": "x0c0s3b0n0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Blade", - "DepthMm": 0, - "Description": "", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - } - ], - "Systems": [ - { - "Data": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0", - "Id": "x0c0s3b0n0", - "@odata.context": "", - "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", - "AssetTag": "", - "BiosVersion": "ex235a.bios-1.3.6", - "Boot": { - "BootOrder": [ - "ME0-PXE-IP4", - "ME0-PXE-IP6", - "HSN0-PXE-IP4", - "HSN0-PXE-IP6", - "HSN1-PXE-IP4", - "HSN1-PXE-IP6", - "HSN2-PXE-IP4", - "HSN3-PXE-IP4", - "HSN2-PXE-IP6", - "HSN3-PXE-IP6", - "Boot000B" - ] - }, - "Description": "BardPeakNC", - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "" - }, - "TimeoutAction": "", - "WarningAction": "" - }, - "HostingRoles": null, - "IndicatorLED": "", - "Manufacturer": "HPE", - "MemorySummary": { - "MemoryMirroring": "", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "TotalSystemMemoryGiB": 512, - "TotalSystemPersistentMemoryGiB": 0 - }, - "Model": "HPE CRAY EX235a", - "Name": "x0c0s3b0n0", - "PCIeDevices@odata.count": 0, - "PCIeFunctions@odata.count": 0, - "PartNumber": "P37085-001.A", - "PowerRestorePolicy": "", - "PowerState": "On", - "ProcessorSummary": { - "Count": 9, - "LogicalProcessorCount": 0, - "Model": "AMD INSTINCT MI200 (MCM) OAM LC", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - } - }, - "Redundancy": "", - "Redundancy@odata.count": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "SubModel": "", - "SystemType": "Physical", - "TrustedModules": null, - "UUID": "", - "SupportedResetTypes": null, - "ManagedBy": null - }, - "EthernetInterfaces": [ - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet2", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/ManagementEthernet", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "Node Maintenance Network", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "ManagementEthernet", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "02:0b:b8:00:30:04", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": null, - "PermanentMACAddress": "02:0b:b8:00:30:04", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet1", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet3", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet0", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "Enabled" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - } - ] - } - ] -} - -HTTP 201 -Content-Type: application/json -[Asserts] -jsonpath "$[0].URI" == "/hsm/v2/Inventory/RedfishEndpoints/x0c0s3b0" - -# Get RedfishEndpoints we just added. -GET http://smd:27779/hsm/v2/Inventory/RedfishEndpoints - -# Response should be: -# -# { -# "RedfishEndpoints": [ -# { -# "ID": "x0c0s1b0", -# "Type": "NodeBMC", -# "Name": "x0c0s1b0", -# "Hostname": "x0c0s1b0", -# "Domain": "", -# "FQDN": "x0c0s1b0", -# "Enabled": true, -# "User": "admin", -# "Password": "password", -# "MACRequired": true, -# "MACAddr": "ae:12:e2:ff:89:9d", -# "IPAddress": "10.254.2.10", -# "RediscoverOnUpdate": false, -# "DiscoveryInfo": { -# "LastDiscoveryStatus": "NotYetQueried" -# } -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "NodeBMC", -# "Name": "x0c0s3b0", -# "Hostname": "x0c0s3b0", -# "Domain": "", -# "FQDN": "x0c0s3b0", -# "Enabled": true, -# "User": "admin", -# "Password": "password", -# "MACRequired": true, -# "MACAddr": "ae:12:e2:ff:89:9e", -# "IPAddress": "10.254.2.11", -# "RediscoverOnUpdate": false, -# "DiscoveryInfo": { -# "LastDiscoveryStatus": "NotYetQueried" -# } -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.RedfishEndpoints" count == 2 -jsonpath "$.RedfishEndpoints[*].ID" includes "x0c0s1b0" -jsonpath "$.RedfishEndpoints[*].ID" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].Hostname" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].Hostname" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].MACAddr" includes "ae:12:e2:ff:89:9d" -jsonpath "$.RedfishEndpoints[*].MACAddr" includes "ae:12:e2:ff:89:9e" -jsonpath "$.RedfishEndpoints[*].IPAddress" includes "10.254.2.10" -jsonpath "$.RedfishEndpoints[*].IPAddress" includes "10.254.2.11" -jsonpath "$.RedfishEndpoints[0].RediscoverOnUpdate" == false -jsonpath "$.RedfishEndpoints[1].RediscoverOnUpdate" == false diff --git a/test/ct/postgres/tests/nid/02-smd-get-components.hurl b/test/ct/postgres/tests/nid/02-smd-get-components.hurl deleted file mode 100644 index 77dcb3c..0000000 --- a/test/ct/postgres/tests/nid/02-smd-get-components.hurl +++ /dev/null @@ -1,28 +0,0 @@ -# Get list of Components. -GET http://smd:27779/hsm/v2/State/Components - -# Response should be: -# -# { -# "Components": [ -# { -# "ID": "x0c0s1b0", -# "Type": "Node", -# "Enabled": false -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "Node", -# "Enabled": false -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.Components[*].ID" includes "x0c0s1b0" -jsonpath "$.Components[*].ID" includes "x0c0s3b0" -jsonpath "$.Components[0].Type" == "Node" -jsonpath "$.Components[0].Enabled" == true -jsonpath "$.Components[1].Type" == "Node" -jsonpath "$.Components[1].Enabled" == true diff --git a/test/ct/postgres/tests/nid/03-smd-get-component-endpoints.hurl b/test/ct/postgres/tests/nid/03-smd-get-component-endpoints.hurl deleted file mode 100644 index 90a1c06..0000000 --- a/test/ct/postgres/tests/nid/03-smd-get-component-endpoints.hurl +++ /dev/null @@ -1,109 +0,0 @@ -# Get list of ComponentEndpoints. -GET http://smd:27779/hsm/v2/Inventory/ComponentEndpoints - -# Response should be: -# -# { -# "ComponentEndpoints": [ -# { -# "ID": "x0c0s1b0", -# "Type": "Node", -# "RedfishType": "ComputerSystem", -# "RedfishSubtype": "Physical", -# "OdataID": "", -# "RedfishEndpointID": "x0c0s1b0", -# "Enabled": true, -# "RedfishEndpointFQDN": "x0c0s1b0", -# "RedfishURL": "x0c0s1b0", -# "ComponentEndpointType": "ComponentEndpointComputerSystem", -# "RedfishSystemInfo": { -# "EthernetNICInfo": [ -# { -# "RedfishId": "HPCNet2", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "ManagementEthernet", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/ManagementEthernet", -# "Description": "Node Maintenance Network", -# "MACAddress": "02:0b:b8:00:30:00" -# }, -# { -# "RedfishId": "HPCNet1", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet3", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet0", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# } -# ] -# } -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "Node", -# "RedfishType": "ComputerSystem", -# "RedfishSubtype": "Physical", -# "OdataID": "", -# "RedfishEndpointID": "x0c0s3b0", -# "Enabled": true, -# "RedfishEndpointFQDN": "x0c0s3b0", -# "RedfishURL": "x0c0s3b0", -# "ComponentEndpointType": "ComponentEndpointComputerSystem", -# "RedfishSystemInfo": { -# "EthernetNICInfo": [ -# { -# "RedfishId": "HPCNet2", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "ManagementEthernet", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/ManagementEthernet", -# "Description": "Node Maintenance Network", -# "MACAddress": "02:0b:b8:00:30:04" -# }, -# { -# "RedfishId": "HPCNet1", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet3", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet0", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# } -# ] -# } -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.ComponentEndpoints" count == 2 -jsonpath "$.ComponentEndpoints[*].ID" includes "x0c0s1b0" -jsonpath "$.ComponentEndpoints[*].ID" includes "x0c0s3b0" -jsonpath "$.ComponentEndpoints[0].Type" == "Node" -jsonpath "$.ComponentEndpoints[1].Type" == "Node" diff --git a/test/ct/postgres/tests/nid/04-bss-add-nids.hurl b/test/ct/postgres/tests/nid/04-bss-add-nids.hurl deleted file mode 100644 index e0369ab..0000000 --- a/test/ct/postgres/tests/nid/04-bss-add-nids.hurl +++ /dev/null @@ -1,61 +0,0 @@ -# Add two NIDs to BSS. -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri3.tld", - "initrd": "https://testinitrduri3.tld", - "nids": [1, 2], - "params": "param5,param6" -} - -HTTP 201 - -# Add another NID to BSS (to see if same boot config got used instead of -# creating another). -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri3.tld", - "initrd": "https://testinitrduri3.tld", - "nids": [3], - "params": "param5,param6" -} - -HTTP 201 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "nids": [ -# 1, -# 2, -# 3 -# ], -# "params": "param5,param6", -# "kernel": "https://testkerneluri3.tld", -# "initrd": "https://testinitrduri3.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].nids" count == 3 -jsonpath "$[0].nids[*]" includes 1 -jsonpath "$[0].nids[*]" includes 2 -jsonpath "$[0].nids[*]" includes 3 -jsonpath "$[0].params" == "param5,param6" -jsonpath "$[0].kernel" == "https://testkerneluri3.tld" -jsonpath "$[0].initrd" == "https://testinitrduri3.tld" diff --git a/test/ct/postgres/tests/nid/05-bss-delete-nid.hurl.notest b/test/ct/postgres/tests/nid/05-bss-delete-nid.hurl.notest deleted file mode 100644 index c5593f0..0000000 --- a/test/ct/postgres/tests/nid/05-bss-delete-nid.hurl.notest +++ /dev/null @@ -1,44 +0,0 @@ -# Delete a NID. -DELETE http://bss:27778/boot/v1/bootparameters -{ - "nids": [2] -} - -HTTP 200 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "hosts": [ -# 1, -# 3 -# ], -# "params": "param5,param6", -# "kernel": "https://testkerneluri3.tld", -# "initrd": "https://testinitrduri3.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].nids" count == 2 -jsonpath "$[0].nids[*]" includes 1 -jsonpath "$[0].nids[*]" includes 3 -jsonpath "$[0].params" == "param5,param6" -jsonpath "$[0].kernel" == "https://testkerneluri3.tld" -jsonpath "$[0].initrd" == "https://testinitrduri3.tld" diff --git a/test/ct/postgres/tests/nid/06-bss-get-boot-script-nid1.hurl b/test/ct/postgres/tests/nid/06-bss-get-boot-script-nid1.hurl deleted file mode 100644 index 95050a3..0000000 --- a/test/ct/postgres/tests/nid/06-bss-get-boot-script-nid1.hurl +++ /dev/null @@ -1,22 +0,0 @@ -# Generate a boot script for first NID and return it. -GET http://bss:27778/boot/v1/bootscript?nid=1 - -# Response should be (trailing newline included): -# -# #!ipxe -# kernel --name kernel https://testkerneluri3.tld initrd=initrd param5,param6 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry -# initrd --name initrd https://testinitrduri3.tld || goto boot_retry -# boot || goto boot_retry -# :boot_retry -# sleep 30 -# chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:00&retry=1 -# -HTTP 200 -[Asserts] -body contains "#!ipxe" -body contains "kernel --name kernel https://testkerneluri3.tld initrd=initrd param5,param6 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry" -body contains "initrd --name initrd https://testinitrduri3.tld || goto boot_retry" -body contains "boot || goto boot_retry" -body contains ":boot_retry" -body contains "sleep 30" -body contains "chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:00&retry=1" diff --git a/test/ct/postgres/tests/nid/07-bss-get-boot-script-mac2.hurl b/test/ct/postgres/tests/nid/07-bss-get-boot-script-mac2.hurl deleted file mode 100644 index c1613c7..0000000 --- a/test/ct/postgres/tests/nid/07-bss-get-boot-script-mac2.hurl +++ /dev/null @@ -1,22 +0,0 @@ -# Generate a boot script for third NID (second was deleted) and return it. -GET http://bss:27778/boot/v1/bootscript?nid=3 - -# Response should be (trailing newline included): -# -# #!ipxe -# kernel --name kernel https://testkerneluri3.tld initrd=initrd param5,param6 xname=x0c0s3b0 ds=nocloud-net;s=localhost/ || goto boot_retry -# initrd --name initrd https://testinitrduri3.tld || goto boot_retry -# boot || goto boot_retry -# :boot_retry -# sleep 30 -# chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:04&retry=1 -# -HTTP 200 -[Asserts] -body contains "#!ipxe" -body contains "kernel --name kernel https://testkerneluri3.tld initrd=initrd param5,param6 xname=x0c0s3b0 ds=nocloud-net;s=localhost/ || goto boot_retry" -body contains "initrd --name initrd https://testinitrduri3.tld || goto boot_retry" -body contains "boot || goto boot_retry" -body contains ":boot_retry" -body contains "sleep 30" -body contains "chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:04&retry=1" diff --git a/test/ct/postgres/tests/nid/08-bss-delete-by-boot-config.hurl.notest b/test/ct/postgres/tests/nid/08-bss-delete-by-boot-config.hurl.notest deleted file mode 100644 index 71b18c8..0000000 --- a/test/ct/postgres/tests/nid/08-bss-delete-by-boot-config.hurl.notest +++ /dev/null @@ -1,18 +0,0 @@ -# Delete everything (by boot config). -DELETE http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri3.tld", - "initrd": "https://testinitrduri3.tld", - "params": "param5,param6" -} - -HTTP 200 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be null, since all of the boot configs, boot groups, -# and nodes should have been deleted. -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$" == null diff --git a/test/ct/postgres/tests/nid/09-smd-delete-redfish-endpoints.hurl.notest b/test/ct/postgres/tests/nid/09-smd-delete-redfish-endpoints.hurl.notest deleted file mode 100644 index 6959bba..0000000 --- a/test/ct/postgres/tests/nid/09-smd-delete-redfish-endpoints.hurl.notest +++ /dev/null @@ -1,16 +0,0 @@ -# Delete RedfishEndpoint for first XName. -DELETE http://smd:27779/hsm/v2/Inventory/RedfishEndpoints/x0c0s1b0 - -HTTP 200 - -# Delete RedfishEndpoint for third XName. -DELETE http://smd:27779/hsm/v2/Inventory/RedfishEndpoints/x0c0s3b0 - -HTTP 200 - -# Get RedfishEndpoints (should be empty). -GET http://smd:27779/hsm/v2/Inventory/RedfishEndpoints - -HTTP 200 -[Asserts] -jsonpath "$.RedfishEndpoints" count == 0 diff --git a/test/ct/postgres/tests/nid/10-smd-delete-components.hurl.notest b/test/ct/postgres/tests/nid/10-smd-delete-components.hurl.notest deleted file mode 100644 index b88557e..0000000 --- a/test/ct/postgres/tests/nid/10-smd-delete-components.hurl.notest +++ /dev/null @@ -1,16 +0,0 @@ -# Delete Component for first XName. -DELETE http://smd:27779/hsm/v2/State/Components/x0c0s1b0 - -HTTP 200 - -# Delete Component for third XName. -DELETE http://smd:27779/hsm/v2/State/Components/x0c0s3b0 - -HTTP 200 - -# Get Components (should be empty). -GET http://smd:27779/hsm/v2/State/Components - -HTTP 200 -[Asserts] -jsonpath "$.Components" count == 0 diff --git a/test/ct/postgres/tests/nid/11-smd-delete-component-endpoints.hurl.notest b/test/ct/postgres/tests/nid/11-smd-delete-component-endpoints.hurl.notest deleted file mode 100644 index 06a1ced..0000000 --- a/test/ct/postgres/tests/nid/11-smd-delete-component-endpoints.hurl.notest +++ /dev/null @@ -1,16 +0,0 @@ -## Delete ComponentEndpoint for first XName. -#DELETE http://smd:27779/hsm/v2/Inventory/ComponentEndpoints/x0c0s1b0 -# -#HTTP 200 -# -## Delete ComponentEndpoint for third XName. -#DELETE http://smd:27779/hsm/v2/Inventory/ComponentEndpoints/x0c0s3b0 -# -#HTTP 200 - -# Get ComponentEndpoints (should be empty). -GET http://smd:27779/hsm/v2/Inventory/ComponentEndpoints - -HTTP 200 -[Asserts] -jsonpath "$.ComponentEndpoints" count == 0 diff --git a/test/ct/postgres/tests/xname/01-smd-add-redfish-endpoints.hurl b/test/ct/postgres/tests/xname/01-smd-add-redfish-endpoints.hurl deleted file mode 100644 index 3479278..0000000 --- a/test/ct/postgres/tests/xname/01-smd-add-redfish-endpoints.hurl +++ /dev/null @@ -1,1471 +0,0 @@ -# Create SMD Redfish endpoints for first xname. -POST http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -{ - "ID": "x0c0s1b0", - "Name": "x0c0s1b0", - "Hostname": "x0c0s1b0", - "FQDN": "", - "User": "admin", - "Password": "password", - "MACRequired": true, - "RediscoverOnUpdate": false, - "MACAddr": "ae:12:e2:ff:89:9d", - "IPAddress": "10.254.2.10", - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/x0c0s1b0", - "Id": "x0c0s1b0", - "Name": "x0c0s1b0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Card", - "DepthMm": 0, - "Description": "SS11 200Gb 2P NIC Mezz", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "R4K44A", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "On", - "SKU": "", - "SerialNumber": "TII0542809843", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/Enclosure", - "Id": "Enclosure", - "Name": "Enclosure", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Enclosure", - "DepthMm": 0, - "Description": "BardPeakNC", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "BardPeakNC", - "PartNumber": "P37085-001.A", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/x0c0s1b0n0", - "Id": "x0c0s1b0n0", - "Name": "x0c0s1b0n0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Blade", - "DepthMm": 0, - "Description": "", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - } - ], - "Systems": [ - { - "Data": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0", - "Id": "x0c0s1b0n0", - "@odata.context": "", - "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", - "AssetTag": "", - "BiosVersion": "ex235a.bios-1.3.6", - "Boot": { - "BootOrder": [ - "ME0-PXE-IP4", - "ME0-PXE-IP6", - "HSN0-PXE-IP4", - "HSN0-PXE-IP6", - "HSN1-PXE-IP4", - "HSN1-PXE-IP6", - "HSN2-PXE-IP4", - "HSN3-PXE-IP4", - "HSN2-PXE-IP6", - "HSN3-PXE-IP6", - "Boot000B" - ] - }, - "Description": "BardPeakNC", - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "" - }, - "TimeoutAction": "", - "WarningAction": "" - }, - "HostingRoles": null, - "IndicatorLED": "", - "Manufacturer": "HPE", - "MemorySummary": { - "MemoryMirroring": "", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "TotalSystemMemoryGiB": 512, - "TotalSystemPersistentMemoryGiB": 0 - }, - "Model": "HPE CRAY EX235a", - "Name": "x0c0s1b0n0", - "PCIeDevices@odata.count": 0, - "PCIeFunctions@odata.count": 0, - "PartNumber": "P37085-001.A", - "PowerRestorePolicy": "", - "PowerState": "On", - "ProcessorSummary": { - "Count": 9, - "LogicalProcessorCount": 0, - "Model": "AMD INSTINCT MI200 (MCM) OAM LC", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - } - }, - "Redundancy": "", - "Redundancy@odata.count": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "SubModel": "", - "SystemType": "Physical", - "TrustedModules": null, - "UUID": "", - "SupportedResetTypes": null, - "ManagedBy": null - }, - "EthernetInterfaces": [ - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet2", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/ManagementEthernet", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "Node Maintenance Network", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "ManagementEthernet", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "02:0b:b8:00:30:00", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": null, - "PermanentMACAddress": "02:0b:b8:00:30:00", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet1", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet3", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet0", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "Enabled" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - } - ] - } - ] -} - -HTTP 201 -Content-Type: application/json -[Asserts] -jsonpath "$[0].URI" == "/hsm/v2/Inventory/RedfishEndpoints/x0c0s1b0" - -# Create SMD Redfish endpoints for third xname (the second will be deleted). -POST http://smd:27779/hsm/v2/Inventory/RedfishEndpoints -{ - "ID": "x0c0s3b0", - "Name": "x0c0s3b0", - "Hostname": "x0c0s3b0", - "FQDN": "", - "User": "admin", - "Password": "password", - "MACRequired": true, - "RediscoverOnUpdate": false, - "MACAddr": "ae:12:e2:ff:89:9e", - "IPAddress": "10.254.2.11", - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/x0c0s3b0", - "Id": "x0c0s3b0", - "Name": "x0c0s3b0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Card", - "DepthMm": 0, - "Description": "SS11 200Gb 2P NIC Mezz", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "R4K44A", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "On", - "SKU": "", - "SerialNumber": "TII0542809843", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/Enclosure", - "Id": "Enclosure", - "Name": "Enclosure", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Enclosure", - "DepthMm": 0, - "Description": "BardPeakNC", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "BardPeakNC", - "PartNumber": "P37085-001.A", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - }, - { - "@odata.id": "/redfish/v1/Chassis/x0c0s3b0n0", - "Id": "x0c0s3b0n0", - "Name": "x0c0s3b0n0", - "@odata.context": "", - "@odata.type": "#Chassis.v1_5_1.Chassis", - "AssetTag": "", - "ChassisType": "Blade", - "DepthMm": 0, - "Description": "", - "Drives@odata.count": 0, - "EnvironmentalClass": "", - "HeightMm": 0, - "IndicatorLED": "", - "Location": { - "AltitudeMeters": 0, - "Contacts": null, - "Info": "", - "InfoFormat": "", - "Latitude": 0, - "Longitude": 0, - "PartLocation": { - "LocationOrdinalValue": 0, - "LocationType": "", - "Orientation": "", - "Reference": "", - "ServiceLabel": "" - }, - "Placement": { - "AdditionalInfo": "", - "Rack": "", - "RackOffset": 0, - "RackOffsetUnits": "", - "Row": "" - }, - "PostalAddress": { - "AdditionalCode": "", - "AdditionalInfo": "", - "Building": "", - "City": "", - "Community": "", - "Country": "", - "District": "", - "Division": "", - "Floor": "", - "GPSCoords": "", - "HouseNumber": 0, - "HouseNumberSuffix": "", - "Landmark": "", - "LeadingStreetDirection": "", - "Location": "", - "Name": "", - "Neighborhood": "", - "POBox": "", - "PlaceType": "", - "PostalCode": "", - "Road": "", - "RoadBranch": "", - "RoadPostModifier": "", - "RoadPreModifier": "", - "RoadSection": "", - "RoadSubBranch": "", - "Room": "", - "Seat": "", - "Street": "", - "StreetSuffix": "", - "Territory": "", - "TrailingStreetSuffix": "", - "Unit": "" - } - }, - "Manufacturer": "HPE", - "Model": "", - "PartNumber": "", - "PhysicalSecurity": { - "IntrusionSensor": "", - "IntrusionSensorNumber": 0, - "IntrusionSensorReArm": "" - }, - "PowerState": "", - "SKU": "", - "SerialNumber": "", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "UUID": "", - "WeightKg": 0, - "WidthMm": 0, - "SupportedResetTypes": null - } - ], - "Systems": [ - { - "Data": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0", - "Id": "x0c0s3b0n0", - "@odata.context": "", - "@odata.type": "#ComputerSystem.v1_5_0.ComputerSystem", - "AssetTag": "", - "BiosVersion": "ex235a.bios-1.3.6", - "Boot": { - "BootOrder": [ - "ME0-PXE-IP4", - "ME0-PXE-IP6", - "HSN0-PXE-IP4", - "HSN0-PXE-IP6", - "HSN1-PXE-IP4", - "HSN1-PXE-IP6", - "HSN2-PXE-IP4", - "HSN3-PXE-IP4", - "HSN2-PXE-IP6", - "HSN3-PXE-IP6", - "Boot000B" - ] - }, - "Description": "BardPeakNC", - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "" - }, - "TimeoutAction": "", - "WarningAction": "" - }, - "HostingRoles": null, - "IndicatorLED": "", - "Manufacturer": "HPE", - "MemorySummary": { - "MemoryMirroring": "", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "TotalSystemMemoryGiB": 512, - "TotalSystemPersistentMemoryGiB": 0 - }, - "Model": "HPE CRAY EX235a", - "Name": "x0c0s3b0n0", - "PCIeDevices@odata.count": 0, - "PCIeFunctions@odata.count": 0, - "PartNumber": "P37085-001.A", - "PowerRestorePolicy": "", - "PowerState": "On", - "ProcessorSummary": { - "Count": 9, - "LogicalProcessorCount": 0, - "Model": "AMD INSTINCT MI200 (MCM) OAM LC", - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - } - }, - "Redundancy": "", - "Redundancy@odata.count": "", - "SKU": "", - "SerialNumber": "WFA2537623994", - "Status": { - "Health": "OK", - "HealthRollup": "", - "State": "Enabled" - }, - "SubModel": "", - "SystemType": "Physical", - "TrustedModules": null, - "UUID": "", - "SupportedResetTypes": null, - "ManagedBy": null - }, - "EthernetInterfaces": [ - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet2", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/ManagementEthernet", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "Node Maintenance Network", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "ManagementEthernet", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "02:0b:b8:00:30:04", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": null, - "PermanentMACAddress": "02:0b:b8:00:30:04", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet1", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet3", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - }, - { - "@odata.context": "", - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0", - "@odata.type": "#EthernetInterface.v1_3_0.EthernetInterface", - "AutoNeg": false, - "DHCPv4": { - "DHCPEnabled": false, - "UseDNSServers": false, - "UseDomainName": false, - "UseGateway": false, - "UseNTPServers": false, - "UseStaticRoutes": false - }, - "DHCPv6": { - "OperatingMode": "", - "UseDNSServers": false, - "UseDomainName": false, - "UseNTPServers": false, - "UseRapidCommit": false - }, - "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", - "EndpointsCount": 0, - "EthernetInterfaceType": "", - "FQDN": "", - "FullDuplex": false, - "HostName": "", - "IPv4Addresses": null, - "IPv4StaticAddresses": null, - "IPv6AddressPolicyTable": null, - "IPv6Addresses": null, - "IPv6DefaultGateway": "", - "IPv6StaticAddresses": null, - "IPv6StaticDefaultGateways": null, - "Id": "HPCNet0", - "InterfaceEnabled": false, - "LinkStatus": "", - "MACAddress": "Not Available", - "MTUSize": 0, - "MaxIPv6StaticAddresses": 0, - "Name": "", - "NameServers": null, - "Oem": { - "Hpe": { - "CassiniMetrics": { - "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0/Oem/Hpe/CassiniMetrics" - } - } - }, - "PermanentMACAddress": "", - "SpeedMbps": 0, - "StatelessAddressAutoConfig": { - "IPv4AutoConfigEnabled": false, - "IPv6AutoConfigEnabled": false - }, - "StaticNameServers": null, - "Status": { - "Health": "", - "HealthRollup": "", - "State": "Enabled" - }, - "UefiDevicePath": "", - "VLAN": { - "VLANEnable": false, - "VLANId": 0 - } - } - ] - } - ] -} - -HTTP 201 -Content-Type: application/json -[Asserts] -jsonpath "$[0].URI" == "/hsm/v2/Inventory/RedfishEndpoints/x0c0s3b0" - -# Get RedfishEndpoints we just added. -GET http://smd:27779/hsm/v2/Inventory/RedfishEndpoints - -# Response should be: -# -# { -# "RedfishEndpoints": [ -# { -# "ID": "x0c0s1b0", -# "Type": "NodeBMC", -# "Name": "x0c0s1b0", -# "Hostname": "x0c0s1b0", -# "Domain": "", -# "FQDN": "x0c0s1b0", -# "Enabled": true, -# "User": "admin", -# "Password": "password", -# "MACRequired": true, -# "MACAddr": "ae:12:e2:ff:89:9d", -# "IPAddress": "10.254.2.10", -# "RediscoverOnUpdate": false, -# "DiscoveryInfo": { -# "LastDiscoveryStatus": "NotYetQueried" -# } -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "NodeBMC", -# "Name": "x0c0s3b0", -# "Hostname": "x0c0s3b0", -# "Domain": "", -# "FQDN": "x0c0s3b0", -# "Enabled": true, -# "User": "admin", -# "Password": "password", -# "MACRequired": true, -# "MACAddr": "ae:12:e2:ff:89:9e", -# "IPAddress": "10.254.2.11", -# "RediscoverOnUpdate": false, -# "DiscoveryInfo": { -# "LastDiscoveryStatus": "NotYetQueried" -# } -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.RedfishEndpoints" count == 2 -jsonpath "$.RedfishEndpoints[*].ID" includes "x0c0s1b0" -jsonpath "$.RedfishEndpoints[*].ID" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].Hostname" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].Hostname" includes "x0c0s3b0" -jsonpath "$.RedfishEndpoints[*].MACAddr" includes "ae:12:e2:ff:89:9d" -jsonpath "$.RedfishEndpoints[*].MACAddr" includes "ae:12:e2:ff:89:9e" -jsonpath "$.RedfishEndpoints[*].IPAddress" includes "10.254.2.10" -jsonpath "$.RedfishEndpoints[*].IPAddress" includes "10.254.2.11" -jsonpath "$.RedfishEndpoints[0].RediscoverOnUpdate" == false -jsonpath "$.RedfishEndpoints[1].RediscoverOnUpdate" == false diff --git a/test/ct/postgres/tests/xname/02-smd-get-components.hurl b/test/ct/postgres/tests/xname/02-smd-get-components.hurl deleted file mode 100644 index 77dcb3c..0000000 --- a/test/ct/postgres/tests/xname/02-smd-get-components.hurl +++ /dev/null @@ -1,28 +0,0 @@ -# Get list of Components. -GET http://smd:27779/hsm/v2/State/Components - -# Response should be: -# -# { -# "Components": [ -# { -# "ID": "x0c0s1b0", -# "Type": "Node", -# "Enabled": false -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "Node", -# "Enabled": false -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.Components[*].ID" includes "x0c0s1b0" -jsonpath "$.Components[*].ID" includes "x0c0s3b0" -jsonpath "$.Components[0].Type" == "Node" -jsonpath "$.Components[0].Enabled" == true -jsonpath "$.Components[1].Type" == "Node" -jsonpath "$.Components[1].Enabled" == true diff --git a/test/ct/postgres/tests/xname/03-smd-get-component-endpoints.hurl b/test/ct/postgres/tests/xname/03-smd-get-component-endpoints.hurl deleted file mode 100644 index 90a1c06..0000000 --- a/test/ct/postgres/tests/xname/03-smd-get-component-endpoints.hurl +++ /dev/null @@ -1,109 +0,0 @@ -# Get list of ComponentEndpoints. -GET http://smd:27779/hsm/v2/Inventory/ComponentEndpoints - -# Response should be: -# -# { -# "ComponentEndpoints": [ -# { -# "ID": "x0c0s1b0", -# "Type": "Node", -# "RedfishType": "ComputerSystem", -# "RedfishSubtype": "Physical", -# "OdataID": "", -# "RedfishEndpointID": "x0c0s1b0", -# "Enabled": true, -# "RedfishEndpointFQDN": "x0c0s1b0", -# "RedfishURL": "x0c0s1b0", -# "ComponentEndpointType": "ComponentEndpointComputerSystem", -# "RedfishSystemInfo": { -# "EthernetNICInfo": [ -# { -# "RedfishId": "HPCNet2", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet2", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "ManagementEthernet", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/ManagementEthernet", -# "Description": "Node Maintenance Network", -# "MACAddress": "02:0b:b8:00:30:00" -# }, -# { -# "RedfishId": "HPCNet1", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet1", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet3", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet3", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet0", -# "@odata.id": "/redfish/v1/Systems/x0c0s1b0n0/EthernetInterfaces/HPCNet0", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# } -# ] -# } -# }, -# { -# "ID": "x0c0s3b0", -# "Type": "Node", -# "RedfishType": "ComputerSystem", -# "RedfishSubtype": "Physical", -# "OdataID": "", -# "RedfishEndpointID": "x0c0s3b0", -# "Enabled": true, -# "RedfishEndpointFQDN": "x0c0s3b0", -# "RedfishURL": "x0c0s3b0", -# "ComponentEndpointType": "ComponentEndpointComputerSystem", -# "RedfishSystemInfo": { -# "EthernetNICInfo": [ -# { -# "RedfishId": "HPCNet2", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet2", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "ManagementEthernet", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/ManagementEthernet", -# "Description": "Node Maintenance Network", -# "MACAddress": "02:0b:b8:00:30:04" -# }, -# { -# "RedfishId": "HPCNet1", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet1", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet3", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet3", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# }, -# { -# "RedfishId": "HPCNet0", -# "@odata.id": "/redfish/v1/Systems/x0c0s3b0n0/EthernetInterfaces/HPCNet0", -# "Description": "SS11 200Gb 2P NIC Mezz REV02 (HSN)", -# "MACAddress": "Not Available" -# } -# ] -# } -# } -# ] -# } -HTTP 200 -Content-Type: application/json -[Asserts] -jsonpath "$.ComponentEndpoints" count == 2 -jsonpath "$.ComponentEndpoints[*].ID" includes "x0c0s1b0" -jsonpath "$.ComponentEndpoints[*].ID" includes "x0c0s3b0" -jsonpath "$.ComponentEndpoints[0].Type" == "Node" -jsonpath "$.ComponentEndpoints[1].Type" == "Node" diff --git a/test/ct/postgres/tests/xname/04-bss-add-xnames.hurl b/test/ct/postgres/tests/xname/04-bss-add-xnames.hurl deleted file mode 100644 index 5fb533d..0000000 --- a/test/ct/postgres/tests/xname/04-bss-add-xnames.hurl +++ /dev/null @@ -1,61 +0,0 @@ -# Add two xnames to BSS. -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri1.tld", - "initrd": "https://testinitrduri1.tld", - "hosts": ["x0c0s1b0", "x0c0s2b0"], - "params": "param1,param2" -} - -HTTP 201 - -# Add another xname to BSS (to see if same boot config got used instead of -# creating another). -POST http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri1.tld", - "initrd": "https://testinitrduri1.tld", - "hosts": ["x0c0s3b0"], - "params": "param1,param2" -} - -HTTP 201 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "hosts": [ -# "x0c0s1b0", -# "x0c0s2b0", -# "x0c0s3b0" -# ], -# "params": "param1,param2", -# "kernel": "https://testkerneluri1.tld", -# "initrd": "https://testinitrduri1.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].hosts" count == 3 -jsonpath "$[0].hosts[*]" includes "x0c0s1b0" -jsonpath "$[0].hosts[*]" includes "x0c0s2b0" -jsonpath "$[0].hosts[*]" includes "x0c0s3b0" -jsonpath "$[0].params" == "param1,param2" -jsonpath "$[0].kernel" == "https://testkerneluri1.tld" -jsonpath "$[0].initrd" == "https://testinitrduri1.tld" diff --git a/test/ct/postgres/tests/xname/05-bss-delete-xname.hurl b/test/ct/postgres/tests/xname/05-bss-delete-xname.hurl deleted file mode 100644 index 0c36828..0000000 --- a/test/ct/postgres/tests/xname/05-bss-delete-xname.hurl +++ /dev/null @@ -1,44 +0,0 @@ -# Delete an xname. -DELETE http://bss:27778/boot/v1/bootparameters -{ - "hosts": ["x0c0s2b0"] -} - -HTTP 200 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be: -# -# [ -# { -# "hosts": [ -# "x0c0s1b0", -# "x0c0s3b0" -# ], -# "params": "param1,param2", -# "kernel": "https://testkerneluri1.tld", -# "initrd": "https://testinitrduri1.tld", -# "cloud-init": { -# "meta-data": null, -# "user-data": null, -# "phone-home": { -# "pub_key_dsa": "", -# "pub_key_rsa": "", -# "pub_key_ecdsa": "", -# "instance_id": "", -# "hostname": "", -# "fqdn": "" -# } -# } -# } -# ] -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$[0].hosts" count == 2 -jsonpath "$[0].hosts[*]" includes "x0c0s1b0" -jsonpath "$[0].hosts[*]" includes "x0c0s3b0" -jsonpath "$[0].params" == "param1,param2" -jsonpath "$[0].kernel" == "https://testkerneluri1.tld" -jsonpath "$[0].initrd" == "https://testinitrduri1.tld" diff --git a/test/ct/postgres/tests/xname/06-bss-get-boot-script-xname1.hurl b/test/ct/postgres/tests/xname/06-bss-get-boot-script-xname1.hurl deleted file mode 100644 index 01b6ba5..0000000 --- a/test/ct/postgres/tests/xname/06-bss-get-boot-script-xname1.hurl +++ /dev/null @@ -1,22 +0,0 @@ -# Generate a boot script for x0c0s1b0 and return it. -GET http://bss:27778/boot/v1/bootscript?name=x0c0s1b0 - -# Response should be (trailing newline included): -# -# #!ipxe -# kernel --name kernel https://testkerneluri1.tld initrd=initrd param1,param2 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry -# initrd --name initrd https://testinitrduri1.tld || goto boot_retry -# boot || goto boot_retry -# :boot_retry -# sleep 30 -# chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:00&retry=1 -# -HTTP 200 -[Asserts] -body contains "#!ipxe" -body contains "kernel --name kernel https://testkerneluri1.tld initrd=initrd param1,param2 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry" -body contains "initrd --name initrd https://testinitrduri1.tld || goto boot_retry" -body contains "boot || goto boot_retry" -body contains ":boot_retry" -body contains "sleep 30" -body contains "chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:00&retry=1" diff --git a/test/ct/postgres/tests/xname/07-bss-get-boot-script-xname2.hurl b/test/ct/postgres/tests/xname/07-bss-get-boot-script-xname2.hurl deleted file mode 100644 index e4be3e2..0000000 --- a/test/ct/postgres/tests/xname/07-bss-get-boot-script-xname2.hurl +++ /dev/null @@ -1,22 +0,0 @@ -# Generate a boot script for x0c0s3b0 and return it. -GET http://bss:27778/boot/v1/bootscript?name=x0c0s3b0 - -# Response should be (trailing newline included): -# -# #!ipxe -# kernel --name kernel https://testkerneluri1.tld initrd=initrd param1,param2 xname=x0c0s1b0 ds=nocloud-net;s=localhost/ || goto boot_retry -# initrd --name initrd https://testinitrduri1.tld || goto boot_retry -# boot || goto boot_retry -# :boot_retry -# sleep 30 -# chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:04&retry=1 -# -HTTP 200 -[Asserts] -body contains "#!ipxe" -body contains "kernel --name kernel https://testkerneluri1.tld initrd=initrd param1,param2 xname=x0c0s3b0 ds=nocloud-net;s=localhost/ || goto boot_retry" -body contains "initrd --name initrd https://testinitrduri1.tld || goto boot_retry" -body contains "boot || goto boot_retry" -body contains ":boot_retry" -body contains "sleep 30" -body contains "chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=02:0b:b8:00:30:04&retry=1" diff --git a/test/ct/postgres/tests/xname/08-bss-delete-by-boot-config.hurl b/test/ct/postgres/tests/xname/08-bss-delete-by-boot-config.hurl deleted file mode 100644 index dc8f57d..0000000 --- a/test/ct/postgres/tests/xname/08-bss-delete-by-boot-config.hurl +++ /dev/null @@ -1,18 +0,0 @@ -# Delete everything (by boot config). -DELETE http://bss:27778/boot/v1/bootparameters -{ - "kernel": "https://testkerneluri1.tld", - "initrd": "https://testinitrduri1.tld", - "params": "param1,param2" -} - -HTTP 200 - -GET http://bss:27778/boot/v1/bootparameters - -# Response should be null, since all of the boot configs, boot groups, -# and nodes should have been deleted. -HTTP 200 -Content-Type: application/json; charset=UTF-8 -[Asserts] -jsonpath "$" == null diff --git a/test/ct/postgres/tests/xname/09-smd-delete-redfish-endpoints.hurl b/test/ct/postgres/tests/xname/09-smd-delete-redfish-endpoints.hurl deleted file mode 100644 index 6959bba..0000000 --- a/test/ct/postgres/tests/xname/09-smd-delete-redfish-endpoints.hurl +++ /dev/null @@ -1,16 +0,0 @@ -# Delete RedfishEndpoint for first XName. -DELETE http://smd:27779/hsm/v2/Inventory/RedfishEndpoints/x0c0s1b0 - -HTTP 200 - -# Delete RedfishEndpoint for third XName. -DELETE http://smd:27779/hsm/v2/Inventory/RedfishEndpoints/x0c0s3b0 - -HTTP 200 - -# Get RedfishEndpoints (should be empty). -GET http://smd:27779/hsm/v2/Inventory/RedfishEndpoints - -HTTP 200 -[Asserts] -jsonpath "$.RedfishEndpoints" count == 0 diff --git a/test/ct/postgres/tests/xname/10-smd-delete-components.hurl b/test/ct/postgres/tests/xname/10-smd-delete-components.hurl deleted file mode 100644 index b88557e..0000000 --- a/test/ct/postgres/tests/xname/10-smd-delete-components.hurl +++ /dev/null @@ -1,16 +0,0 @@ -# Delete Component for first XName. -DELETE http://smd:27779/hsm/v2/State/Components/x0c0s1b0 - -HTTP 200 - -# Delete Component for third XName. -DELETE http://smd:27779/hsm/v2/State/Components/x0c0s3b0 - -HTTP 200 - -# Get Components (should be empty). -GET http://smd:27779/hsm/v2/State/Components - -HTTP 200 -[Asserts] -jsonpath "$.Components" count == 0 diff --git a/test/ct/postgres/tests/xname/11-smd-delete-component-endpoints.hurl b/test/ct/postgres/tests/xname/11-smd-delete-component-endpoints.hurl deleted file mode 100644 index 06a1ced..0000000 --- a/test/ct/postgres/tests/xname/11-smd-delete-component-endpoints.hurl +++ /dev/null @@ -1,16 +0,0 @@ -## Delete ComponentEndpoint for first XName. -#DELETE http://smd:27779/hsm/v2/Inventory/ComponentEndpoints/x0c0s1b0 -# -#HTTP 200 -# -## Delete ComponentEndpoint for third XName. -#DELETE http://smd:27779/hsm/v2/Inventory/ComponentEndpoints/x0c0s3b0 -# -#HTTP 200 - -# Get ComponentEndpoints (should be empty). -GET http://smd:27779/hsm/v2/Inventory/ComponentEndpoints - -HTTP 200 -[Asserts] -jsonpath "$.ComponentEndpoints" count == 0 From a4111b4f3dbda020d70c13a46eecb9e3f22ec3e4 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 17:52:54 -0700 Subject: [PATCH 03/19] Delete CT stuff Moved to deployment-recipes repo --- docker-compose.test.ct.yaml | 280 ---- runCT.sh | 67 - runSmokeTestsWithSimulator.sh | 30 - runTavernTestsLoadSimulator.sh | 4 - runTavernTestsWithSimulator.sh | 30 - test/ct/Dockerfile.wait-for-smd.Dockerfile | 40 - .../test_bootscript.tavern.yaml | 257 --- .../test_service.negative.tavern.yaml | 105 -- .../1-non-disruptive/test_service.tavern.yaml | 162 -- .../test_bootparameters.negative.tavern.yaml | 580 ------- .../test_bootparameters.tavern.yaml | 1441 ----------------- .../test_cloud-init.negative.tavern.yaml | 221 --- .../2-disruptive/test_cloud-init.tavern.yaml | 351 ---- .../2-disruptive/test_dumpstate.negative.yaml | 61 - ...test_endpoint_history.negative.tavern.yaml | 62 - .../test_endpoint_history.tavern.yaml | 170 -- .../test_hosts.negative.tavern.yaml | 187 --- .../api/2-disruptive/test_hosts.tavern.yaml | 343 ---- .../2-disruptive/test_zzz_cleanup.tavern.yaml | 234 --- .../test_bootparameters.tavern.yaml | 979 ----------- .../3-destructive/test_bootscript.tavern.yaml | 349 ---- .../test_endpoint_history.tavern.yaml | 261 --- .../test_zzz_cleanup.tavern.yaml | 166 -- test/ct/bss_test_utils.py | 75 - test/ct/smoke/smoke.json | 48 - test/ct/tavern_global_config_ct_test.yaml | 9 - test/ct/wait-for.sh | 48 - 27 files changed, 6560 deletions(-) delete mode 100644 docker-compose.test.ct.yaml delete mode 100755 runCT.sh delete mode 100755 runSmokeTestsWithSimulator.sh delete mode 100755 runTavernTestsLoadSimulator.sh delete mode 100755 runTavernTestsWithSimulator.sh delete mode 100644 test/ct/Dockerfile.wait-for-smd.Dockerfile delete mode 100644 test/ct/api/1-non-disruptive/test_bootscript.tavern.yaml delete mode 100644 test/ct/api/1-non-disruptive/test_service.negative.tavern.yaml delete mode 100644 test/ct/api/1-non-disruptive/test_service.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_bootparameters.negative.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_bootparameters.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_cloud-init.negative.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_cloud-init.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_dumpstate.negative.yaml delete mode 100644 test/ct/api/2-disruptive/test_endpoint_history.negative.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_endpoint_history.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_hosts.negative.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_hosts.tavern.yaml delete mode 100644 test/ct/api/2-disruptive/test_zzz_cleanup.tavern.yaml delete mode 100644 test/ct/api/3-destructive/test_bootparameters.tavern.yaml delete mode 100644 test/ct/api/3-destructive/test_bootscript.tavern.yaml delete mode 100644 test/ct/api/3-destructive/test_endpoint_history.tavern.yaml delete mode 100644 test/ct/api/3-destructive/test_zzz_cleanup.tavern.yaml delete mode 100644 test/ct/bss_test_utils.py delete mode 100644 test/ct/smoke/smoke.json delete mode 100644 test/ct/tavern_global_config_ct_test.yaml delete mode 100755 test/ct/wait-for.sh diff --git a/docker-compose.test.ct.yaml b/docker-compose.test.ct.yaml deleted file mode 100644 index 4f066f0..0000000 --- a/docker-compose.test.ct.yaml +++ /dev/null @@ -1,280 +0,0 @@ -version: '3.7' - -networks: - bss: - -services: - - # - # Required services - # - s3: - image: artifactory.algol60.net/docker.io/minio/minio:latest - hostname: s3 - environment: - MINIO_ACCESS_KEY: s3-access-key - MINIO_SECRET_KEY: s3-secret-key - command: server /data - networks: - - bss - - vault: - hostname: vault - image: artifactory.algol60.net/docker.io/library/vault:1.5.5 - environment: - - VAULT_DEV_ROOT_TOKEN_ID=hms - - VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200 - - VAULT_ADDR=http://127.0.0.1:8200 - cap_add: - - IPC_LOCK - networks: - - bss - - vault-kv-enabler: - image: artifactory.algol60.net/csm-docker/stable/vault-kv-enabler:1.13.4 - environment: - - VAULT_ADDR=http://vault:8200 - - VAULT_TOKEN=hms - - KV_STORES=hms-creds - depends_on: - - vault - networks: - - bss - - hmsds-postgres: - hostname: hmsds-postgres - image: artifactory.algol60.net/docker.io/library/postgres:11-alpine - environment: - - POSTGRES_PASSWORD=hmsdsuser - - POSTGRES_USER=hmsdsuser - - POSTGRES_DB=hmsds - networks: - - bss - cray-smd-init: - image: artifactory.algol60.net/csm-docker/stable/cray-smd:1.48.0 - environment: - - SMD_DBHOST=hmsds-postgres - - SMD_DBPORT=5432 - depends_on: - - hmsds-postgres - networks: - - bss - command: /entrypoint.sh smd-init - - cray-smd: - image: artifactory.algol60.net/csm-docker/stable/cray-smd:1.48.0 - environment: - - POSTGRES_HOST=hmsds-postgres - - POSTGRES_PORT=5432 - - RF_MSG_HOST=kafka:9092:cray-dmtf-resource-event - - CRAY_VAULT_AUTH_PATH=auth/token/create - - CRAY_VAULT_ROLE_FILE=configs/namespace - - CRAY_VAULT_JWT_FILE=configs/token - - VAULT_ADDR=http://vault:8200 - - VAULT_TOKEN=hms - - VAULT_KEYPATH=hms-creds - - SMD_WVAULT=true - - SMD_RVAULT=true - hostname: cray-smd - depends_on: - - cray-smd-init - - vault - networks: - - bss - - zookeeper: - image: artifactory.algol60.net/docker.io/confluentinc/cp-zookeeper:6.1.1 - hostname: zookeeper - environment: - ZOOKEEPER_CLIENT_PORT: 2181 - ZOOKEEPER_TICK_TIME: 2000 - networks: - - bss - - kafka: - image: artifactory.algol60.net/docker.io/confluentinc/cp-kafka:6.1.1 - hostname: kafka - depends_on: - - zookeeper - environment: - KAFKA_BROKER_ID: 1 - KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 - networks: - - bss - - cray-hms-hmcollector: - image: artifactory.algol60.net/csm-docker/stable/hms-hmcollector:2.12.4 - environment: - - LOG_LEVEL=TRACE - - SM_URL=http://cray-smd:27779 - - POLLING_ENABLED=false - - RF_SUBSCRIBE_ENABLED=false - - REST_PORT=80 - - VAULT_TOKEN=hms - - CRAY_VAULT_JWT_FILE=configs/token - - CRAY_VAULT_ROLE_FILE=configs/namespace - - CRAY_VAULT_AUTH_PATH=auth/token/create - - VAULT_ADDR=http://vault:8200 - volumes: - - ./configs/kafka_brokers.json:/configs/kafka_brokers.json - - ./configs/namespace:/configs/namespace - - ./configs/token:/configs/token - networks: - - bss - depends_on: - - kafka - - cray-hmnfd-etcd: - image: artifactory.algol60.net/quay.io/coreos/etcd:v3.4.7 - environment: - - ALLOW_NONE_AUTHENTICATION=yes - - ETCD_ADVERTISE_CLIENT_URLS=http://cray-hmnfd-etcd:2379 - - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 - networks: - - bss - - cray-hmnfd: - hostname: cray-hmnfd - image: artifactory.algol60.net/csm-docker/stable/cray-hmnfd:1.13.0 - environment: - - DEBUG=0 - - SM_URL=http://cray-smd:27779/hsm/v2 - - INBOUND_SCN_URL=https://cray-hmnfd:28600/hmi/v1/scn - - SM_RETRIES=3 - - SM_TIMEOUT=10 - - PORT=28600 - - ETCD_HOST=cray-hmnfd-etcd - - ETCD_PORT=2379 - - TELEMETRY_HOST=kafka:9092:cray-hmsstatechange-notifications - depends_on: - - kafka - - cray-hmnfd-etcd - networks: - - bss - - # - # Emulated hardware - # - emulator-loader: - image: artifactory.algol60.net/docker.io/library/golang:1.16-alpine - command: > - sh -c "apk add curl && sleep 10 && - curl -X POST -d '{\"RedfishEndpoints\":[{ - \"ID\":\"x0c0s1b0\", - \"FQDN\":\"x0c0s1b0\", - \"RediscoverOnUpdate\":true, - \"User\":\"root\", - \"Password\":\"root_password\" - },{ - \"ID\":\"x0c0s2b0\", - \"FQDN\":\"x0c0s2b0\", - \"RediscoverOnUpdate\":true, - \"User\":\"root\", - \"Password\":\"root_password\" - }]}' http://cray-smd:27779/hsm/v2/Inventory/RedfishEndpoints" - depends_on: - - cray-smd - - rfemulator0 - - rfemulator1 - networks: - - bss - rfemulator0: - hostname: x0c0s1b0 - image: artifactory.algol60.net/csm-docker/stable/csm-rie:1.3.0 - environment: - - MOCKUPFOLDER=EX235a - - MAC_SCHEMA=Mountain - - XNAME=x0c0s1b0 - - PORT=443 - networks: - bss: - aliases: - - x0c0s1b0 - rfemulator1: - hostname: x0c0s2b0 - image: artifactory.algol60.net/csm-docker/stable/csm-rie:1.3.0 - environment: - - MOCKUPFOLDER=EX235a - - MAC_SCHEMA=Mountain - - XNAME=x0c0s2b0 - - PORT=443 - networks: - bss: - aliases: - - x0c0s2b0 - - # - # Service under test - # - cray-bss-etcd: - image: artifactory.algol60.net/quay.io/coreos/etcd:v3.4.7 - environment: - - ALLOW_NONE_AUTHENTICATION=yes - - ETCD_ADVERTISE_CLIENT_URLS=http://cray-bss-etcd:2379 - - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 - networks: - - bss - - cray-bss: - build: - context: . - dockerfile: Dockerfile - environment: - - BSS_ADVERTISE_ADDRESS=cray-bss:27778 - - ETCD_HOST=cray-bss-etcd - - ETCD_PORT=2379 - - HSM_URL=http://cray-smd:27779 - - NFD_URL=http://cray-hmnfd:28600 - - S3_ACCESS_KEY=foo - - S3_SECRET_KEY=foo - - S3_BUCKET=images - - S3_ENDPOINT=s3 - depends_on: - - cray-bss-etcd - - cray-smd - - cray-hmnfd - - cray-hms-hmcollector - - emulator-loader - - vault-kv-enabler - networks: - - bss - - - # - # Tests - # - wait-for-smd: - build: - context: test/ct/ - dockerfile: Dockerfile.wait-for-smd.Dockerfile - depends_on: - - cray-bss - - cray-smd - - cray-hmnfd - networks: - - bss - - tavern: - build: - context: test/ct/ - dockerfile: Dockerfile - depends_on: - - cray-bss - entrypoint: entrypoint.sh tavern -c /src/app/tavern_global_config_ct_test.yaml -p /src/app/api - networks: - - bss - - - smoke: - build: - context: test/ct/ - dockerfile: Dockerfile - depends_on: - - cray-bss - entrypoint: entrypoint.sh smoke -f smoke.json -u http://cray-bss:27778 - networks: - - bss diff --git a/runCT.sh b/runCT.sh deleted file mode 100755 index 9311fce..0000000 --- a/runCT.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -# -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -set -x - - -# Configure docker compose -export COMPOSE_PROJECT_NAME=$RANDOM -export COMPOSE_FILE=docker-compose.test.ct.yaml - -echo "COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME}" -echo "COMPOSE_FILE: $COMPOSE_FILE" - - -function cleanup() { - echo "Cleaning up containers..." - if ! docker compose down --remove-orphans; then - echo "Failed to decompose environment!" - exit 1 - fi - exit $1 -} - -# Get the base containers running -echo "Starting containers..." -docker compose build --no-cache -docker compose up -d cray-bss #this will stand up everything except for the integration test container - -# wait for containers to stabilize and simulated HSM hardware discoveries to complete -docker compose up --exit-code-from wait-for-smd wait-for-smd - -if ! docker compose up --exit-code-from smoke smoke; then - echo "CT smoke tests FAILED!" - cleanup 1 -fi - -# execute the CT functional tests -if ! docker compose up --exit-code-from tavern tavern; then - echo "CT tavern tests FAILED!" - cleanup 1 -fi - -# Cleanup -echo "CT tests PASSED!" -cleanup 0 \ No newline at end of file diff --git a/runSmokeTestsWithSimulator.sh b/runSmokeTestsWithSimulator.sh deleted file mode 100755 index 6f0398e..0000000 --- a/runSmokeTestsWithSimulator.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -set -ex - -make ct_image -VERSION=$(cat .version) -docker run --rm --network hms-simulation-environment_simulation hms-bss-hmth-test:${VERSION} \ - smoke -f smoke.json -u http://cray-bss:27778 diff --git a/runTavernTestsLoadSimulator.sh b/runTavernTestsLoadSimulator.sh deleted file mode 100755 index 34f2eda..0000000 --- a/runTavernTestsLoadSimulator.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Currently nothing needs to be manually loaded into simulator -echo "Nothing to do" \ No newline at end of file diff --git a/runTavernTestsWithSimulator.sh b/runTavernTestsWithSimulator.sh deleted file mode 100755 index 4e9f520..0000000 --- a/runTavernTestsWithSimulator.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -set -ex - -make ct_image -VERSION=$(cat .version) -docker run --rm --network hms-simulation-environment_simulation hms-bss-hmth-test:${VERSION} \ - tavern -c /src/app/tavern_global_config_ct_test.yaml -p /src/app/api \ No newline at end of file diff --git a/test/ct/Dockerfile.wait-for-smd.Dockerfile b/test/ct/Dockerfile.wait-for-smd.Dockerfile deleted file mode 100644 index 96f61e2..0000000 --- a/test/ct/Dockerfile.wait-for-smd.Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -FROM artifactory.algol60.net/csm-docker/stable/docker.io/library/alpine:3.15 - -RUN set -x \ - && apk -U upgrade \ - && apk add --no-cache \ - bash \ - curl \ - jq - -COPY wait-for.sh /src/app/wait-for.sh - -WORKDIR /src/app -# Run as nobody -RUN chown -R 65534:65534 /src -USER 65534:65534 - -# this is inherited from the hms-test container -CMD [ "/src/app/wait-for.sh" ] \ No newline at end of file diff --git a/test/ct/api/1-non-disruptive/test_bootscript.tavern.yaml b/test/ct/api/1-non-disruptive/test_bootscript.tavern.yaml deleted file mode 100644 index cd297b4..0000000 --- a/test/ct/api/1-non-disruptive/test_bootscript.tavern.yaml +++ /dev/null @@ -1,257 +0,0 @@ -# MIT License -# -# (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for the Boot Script Service (BSS) bootscript API. -# Author: Isa Wazirzada, Mitch Schooler -# Service: Boot Script Service - -# HMS test metrics test cases: 18 -# 1. GET /dumpstate API response code -# 2. GET /dumpstate API response body -# 3. GET /bootscript?nid={nid} API response code -# 4. GET /bootscript?mac={mac_address} API response code -# 5. GET /bootscript?name={node_name} API response code -# 6. GET /bootscript?nid={invalid_nid} out-of-range nid API response code -# 7. GET /bootscript?nid={invalid_nid} out-of-range nid API response body -# 9. GET /bootscript?nid={invalid_nid} string nid API response code -# 10. GET /bootscript?nid={invalid_nid} string nid API response body -# 11. GET /bootscript?nid={invalid_nid} negative nid API response code -# 12. GET /bootscript?nid={invalid_nid} negative nid API response body -# 13. GET /bootscript?nid={invalid_nid} character (*) nid API response code -# 14. GET /bootscript?nid={invalid_nid} character (*) nid API response body -# 15. GET /bootscript?nid={invalid_nid} empty string nid API response code -# 16. GET /bootscript?nid={invalid_nid} empty string nid API response body -# 17. GET /bootscript?{invalid_parameter} API response code -# 18. GET /bootscript?{invalid_parameter} API response body ---- -test_name: Verify the dumpstate resource - -stages: - # 1. GET /dumpstate API response code - # 2. GET /dumpstate API response body - - name: Ensure the boot script service can dump its state - request: - url: "{bss_base_url}/boot/v1/dumpstate" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - Components: - type: seq - matching: all - sequence: - - type: map - matching: all - mapping: - Arch: - type: str - Class: - type: str - #TODO: workaround CAN NCNs in HSM issue CASMHMS-2913 - #required: True - required: False - Enabled: - type: bool - EndpointEnabled: - type: bool - required: False - FQDN: - type: str - Flag: - type: str - ID: - type: str - Locked: - type: bool - required: False - MAC: - type: seq - matching: all - sequence: - - type: str - NID: - type: int - NetType: - type: str - Role: - type: str - SoftwareStatus: - type: str - required: False - State: - type: str - SubRole: - type: str - required: False - Type: - type: str - Params: - type: seq - sequence: - - type: map - matching: all - mapping: - hosts: - type: seq - required: False - sequence: - - type: str - params: - type: str - required: False - kernel: - type: str - required: False - initrd: - type: str - required: False - cloud-init: - type: map - required: False - matching: all - mapping: - meta-data: - type: str - user-data: - type: str - phone-home: - type: map - matching: all - mapping: - pub_key_dsa: - type: str - pub_key_rsa: - type: str - pub_key_ecdsa: - type: str - instance_id: - type: str - hostname: - type: str - fqdn: - type: str ---- -test_name: Verify the bootscript resource - -stages: - - name: Save the node name, nid, and mac address for use in later stages - request: - url: "{bss_base_url}/boot/v1/dumpstate" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - nid: Components[0].NID - node_name: Components[0].ID - mac_address: Components[0].MAC[0] - - # 3. GET /bootscript?nid={nid} API response code - - name: Ensure the boot script service can provide the bootscript for a given node - request: - url: "{bss_base_url}/boot/v1/bootscript?nid={nid}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - - # 4. GET /bootscript?mac={mac_address} API response code - - name: Ensure the boot script service can provide the bootscript for a given mac address - request: - url: "{bss_base_url}/boot/v1/bootscript?mac={mac_address}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - - # 5. GET /bootscript?name={node_name} API response code - - name: Ensure the boot script service can provide the bootscript for a given node name - request: - url: "{bss_base_url}/boot/v1/bootscript?name={node_name}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - ---- -test_name: Verify the bootscript service gracefully handles invalid nids for the bootscript resource - -marks: - - parametrize: - key: invalid_nid - vals: - # 6. GET /bootscript?nid={invalid_nid} out-of-range nid API response code - # 7. GET /bootscript?nid={invalid_nid} out-of-range nid API response body - - 9999999999999999999999999999 - # 9. GET /bootscript?nid={invalid_nid} string nid API response code - # 10. GET /bootscript?nid={invalid_nid} string nid API response body - - one - # 11. GET /bootscript?nid={invalid_nid} negative nid API response code - # 12. GET /bootscript?nid={invalid_nid} negative nid API response body - - -1 - # 13. GET /bootscript?nid={invalid_nid} character (*) nid API response code - # 14. GET /bootscript?nid={invalid_nid} character (*) nid API response body - - "*" - # 15. GET /bootscript?nid={invalid_nid} empty string nid API response code - # 16. GET /bootscript?nid={invalid_nid} empty string nid API response body - - "" - -stages: - - name: Validate a graceful failure when providing an invalid nid - request: - url: "{bss_base_url}/boot/v1/bootscript?nid={invalid_nid}" - method: GET - verify: !bool "{verify}" - response: - status_code: 400 - json: - type: about:blank - title: Bad Request - status: 400 - detail: !anystr - ---- -test_name: Verify the bootscript service gracefully handles invalid query parameters for the bootscript resource - -stages: - # 17. GET /bootscript?{invalid_parameter} API response code - # 18. GET /bootscript?{invalid_parameter} API response body - - name: Validate a graceful failure when providing an invalid query parameter - request: - url: "{bss_base_url}/boot/v1/bootscript?foo" - method: GET - verify: !bool "{verify}" - response: - status_code: 400 - json: - type: about:blank - title: Bad Request - status: 400 - detail: !anystr diff --git a/test/ct/api/1-non-disruptive/test_service.negative.tavern.yaml b/test/ct/api/1-non-disruptive/test_service.negative.tavern.yaml deleted file mode 100644 index 5c76950..0000000 --- a/test/ct/api/1-non-disruptive/test_service.negative.tavern.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# MIT License -# -# (C) Copyright [2021-2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for the BSS health APIs -# Author: Ryan Sjostrand - -# Service: Boot Script Service - -# HMS test metrics test cases: 16 -# 1. POST /boot/v1/service/status API response code -# 2. POST /boot/v1/service/etcd API response code -# 3. POST /boot/v1/service/hsm API response code -# 4. POST /boot/v1/service/status/all API response code -# 5. PUT /boot/v1/service/status API response code -# 6. PUT /boot/v1/service/etcd API response code -# 7. PUT /boot/v1/service/hsm API response code -# 8. PUT /boot/v1/service/status/all API response code -# 9. PATCH /boot/v1/service/status API response code -# 10. PATCH /boot/v1/service/etcd API response code -# 11. PATCH /boot/v1/service/hsm API response code -# 12. PATCH /boot/v1/service/status/all API response code -# 13. DELETE /boot/v1/service/status API response code -# 14. DELETE /boot/v1/service/etcd API response code -# 15. DELETE /boot/v1/service/hsm API response code -# 16. DELETE /boot/v1/service/status/all API response code - ---- -test_name: bssAPIServiceAPIsNegative - Verify POST, PUT, PATCH, DELETE against service endpoints - -marks: - - parametrize: - key: service_endpoint - vals: - - service/status - - service/etcd - - service/hsm - - service/status/all - -stages: -# 1. POST /boot/v1/service/status API response code -# 2. POST /boot/v1/service/etcd API response code -# 3. POST /boot/v1/service/hsm API response code -# 4. POST /boot/v1/service/status/all API response code -- name: bssAPIServicePOST - Perform POST against the BSS service endpoint - request: - url: "{bss_base_url}/boot/v1/{service_endpoint}" - method: POST - verify: !bool "{verify}" - response: - status_code: 405 - -# 5. PUT /boot/v1/service/status API response code -# 6. PUT /boot/v1/service/etcd API response code -# 7. PUT /boot/v1/service/hsm API response code -# 8. PUT /boot/v1/service/status/all API response code -- name: bssAPIServicePUT - Perform PUT against the BSS service endpoint - request: - url: "{bss_base_url}/boot/v1/{service_endpoint}" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 - -# 9. PATCH /boot/v1/service/status API response code -# 10. PATCH /boot/v1/service/etcd API response code -# 11. PATCH /boot/v1/service/hsm API response code -# 12. PATCH /boot/v1/service/status/all API response code -- name: bssAPIServicePATCH - Perform PATCH against the BSS service endpoint - request: - url: "{bss_base_url}/boot/v1/service/status" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -# 13. DELETE /boot/v1/service/status API response code -# 14. DELETE /boot/v1/service/etcd API response code -# 15. DELETE /boot/v1/service/hsm API response code -# 16. DELETE /boot/v1/service/status/all API response code -- name: bssAPIServiceDELETE - Perform DELETE against the BSS service endpoint - request: - url: "{bss_base_url}/boot/v1/{service_endpoint}" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 diff --git a/test/ct/api/1-non-disruptive/test_service.tavern.yaml b/test/ct/api/1-non-disruptive/test_service.tavern.yaml deleted file mode 100644 index ce77172..0000000 --- a/test/ct/api/1-non-disruptive/test_service.tavern.yaml +++ /dev/null @@ -1,162 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for the BSS health APIs -# Author: Ryan Sjostrand - -# Service: Boot Script Service - -# HMS test metrics test cases: 10 -# 1. GET /boot/v1/service/status API response code -# 2. GET /boot/v1/service/status API response body -# 3. GET /boot/v1/service/etcd API response code -# 4. GET /boot/v1/service/etcd API response body -# 5. GET /boot/v1/service/hsm API response code -# 6. GET /boot/v1/service/hsm API response body -# 7. GET /boot/v1/service/version API response code -# 8. GET /boot/v1/service/version API response body -# 9. GET /boot/v1/service/status/all API response code -# 10. GET /boot/v1/service/status/all API response body ---- -test_name: bssAPIServiceAPIs - -stages: -# 1. GET /boot/v1/service/status API response code -# 2. GET /boot/v1/service/status API response body -- name: bssAPIServiceStatusGET - Ensure the BSS service status endpoint can be retrieved - request: - url: "{bss_base_url}/boot/v1/service/status" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - bss-status: - type: str - required: True - enum: - - running - -# 3. GET /boot/v1/service/etcd API response code -# 4. GET /boot/v1/service/etcd API response body -- name: bssAPIServiceEctdGET - Ensure the BSS service ETCD status endpoint can be retrieved - request: - url: "{bss_base_url}/boot/v1/service/etcd" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - bss-status-etcd: - type: str - required: True - enum: - - connected - -# 5. GET /boot/v1/service/hsm API response code -# 6. GET /boot/v1/service/hsm API response body -- name: bssAPIServiceHsmGET - Ensure the BSS service HSM status endpoint can be retrieved - request: - url: "{bss_base_url}/boot/v1/service/hsm" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - bss-status-hsm: - type: str - required: True - enum: - - connected - -# 7. GET /boot/v1/service/version API response code -# 8. GET /boot/v1/service/version API response body -- name: bssAPIServiceVersionGET - Ensure the BSS version endpoint can be retrieved - request: - url: "{bss_base_url}/boot/v1/service/version" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - bss-version: - type: str - required: True - -# 9. GET /boot/v1/service/status/all API response code -# 10. GET /boot/v1/service/status/all API response body -- name: bssAPIServiceStatusAllGET - Ensure the BSS service all statuses endpoint can be retrieved - request: - url: "{bss_base_url}/boot/v1/service/status/all" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - bss-status: - type: str - required: True - enum: - - running - bss-status-etcd: - type: str - required: True - enum: - - connected - bss-status-hsm: - type: str - required: True - enum: - - connected - bss-version: - type: str - required: True diff --git a/test/ct/api/2-disruptive/test_bootparameters.negative.tavern.yaml b/test/ct/api/2-disruptive/test_bootparameters.negative.tavern.yaml deleted file mode 100644 index 2760cae..0000000 --- a/test/ct/api/2-disruptive/test_bootparameters.negative.tavern.yaml +++ /dev/null @@ -1,580 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern negative test cases for the BSS bootparameters API -# Author: Ryan Sjostrand -# Service: Boot Script Service - -# HMS test metrics test cases: 30 (8 disabled) -# 1. POST /bootparameters with invalid json. API response code -# 2. POST /bootparameters with invalid json. API response body -# 3. PATCH /bootparameters with invalid json. API response code -# 4. PATCH /bootparameters with invalid json. API response body -# 5. PUT /bootparameters with invalid json. API response code -# 6. PUT /bootparameters with invalid json. API response body -# 7. DELETE /bootparameters with invalid json. API response code -# 8. DELETE /bootparameters with invalid json. API response body -# -# 9. GET /bootparameters?nid=1notANid with invalid nid. API Response code -# 10. GET /bootparameters?nid=1notANid with invalid nid. API Response body -# 11. GET /bootparameters?mac=1notAMac with invalid mac address. API Response code -# 12. GET /bootparameters?mac=1notAMac with invalid mav address. API Response body -# -# 13. GET /bootparameters with non-existent host. API response code -# 14. GET /bootparameters with non-existent host. API response body -# 15. DISABLED PATCH /bootparameters with non-existent host. API response code -# 16. DISABLED PATCH /bootparameters with non-existent host. API response body -# 17. DELETE /bootparameters with non-existent host. API response code -# 18. DELETE /bootparameters with non-existent host. API response body -# -# 19. GET /bootparameters with non-existent nid. API response code -# 20. GET /bootparameters with non-existent nid. API response body -# 21. DISABLED PATCH /bootparameters with non-existent nid. API response code -# 22. DISABLED PATCH /bootparameters with non-existent nid. API response body -# 23. DELETE /bootparameters with non-existent nid. API response code -# 24. DELETE /bootparameters with non-existent nid. API response body -# -# 25. GET /bootparameters with non-existent mac address. API response code -# 26. GET /bootparameters with non-existent mac address. API response body -# 27. DISABLED PATCH /bootparameters with non-existent mac address. API response code -# 28. DISABLED PATCH /bootparameters with non-existent mac address. API response body -# 29. DISABLED DELETE /bootparameters with non-existent mac address. API response code -# 30. DISABLED DELETE /bootparameters with non-existent mac address. API response body ---- -test_name: bssAPIBootparametersBadData - -stages: -# 1. POST /bootparameters with invalid json. API response code -# 2. POST /bootparameters with invalid json. API response body -- name: Perform POST against /bootparameters with invalid json - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - data: "This is not json" - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 3. PATCH /bootparameters with invalid json. API response code -# 4. PATCH /bootparameters with invalid json. API response body -- name: Perform PATCH against /bootparameters with invalid json - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PATCH - verify: !bool "{verify}" - data: "This is not json" - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 5. PUT /bootparameters with invalid json. API response code -# 6. PUT /bootparameters with invalid json. API response body -- name: Perform PUT against /bootparameters with invalid json - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - data: "This is not json" - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 7. DELETE /bootparameters with invalid json. API response code -# 8. DELETE /bootparameters with invalid json. API response body -- name: Perform DELETE against /bootparameters with invalid json - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - data: "This is not json" - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 9. GET /bootparameters?nid=1notANid with invalid nid. API Response code -# 10. GET /bootparameters?nid=1notANid with invalid nid. API Response body -- name: Search BSS bootparameters with invalid NID - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: GET - verify: !bool "{verify}" - params: - nid: 1notANid - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 11. GET /bootparameters?mac=1notAMac with invalid mac address. API Response code -# 12. GET /bootparameters?mac=1notAMac with invalid mav address. API Response body -- name: Search BSS bootparameters with invalid MAC address - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: GET - verify: !bool "{verify}" - params: - mac: 1notAMac - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - ---- -test_name: bssAPIBootparametersNonExistent - -stages: -# 13. GET /bootparameters with non-existent host. API response code -# 14. GET /bootparameters with non-existent host. API response body -- name: Perform GET against bootparameters with non-existent host - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: GET - verify: !bool "{verify}" - params: - name: does_not_exist - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 15. DISABLED CASMHMS-5816 PATCH /bootparameters with non-existent host. API response code -# 16. DISABLED CASMHMS-5816 PATCH /bootparameters with non-existent host. API response body -# - name: Perform PATCH against bootparameters with non-existent host -# request: -# url: "{bss_base_url}/boot/v1/bootparameters" -# method: PATCH -# verify: !bool "{verify}" -# json: -# hosts: -# - x9999c0s2b0n0 -# response: -# status_code: 404 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: map -# required: True -# mapping: -# type: -# type: str -# required: True -# title: -# type: str -# required: True -# detail: -# type: str -# required: False -# instance: -# type: str -# required: False -# status: -# type: int -# required: False - -# 17. DELETE /bootparameters with non-existent host. API response code -# 18. DELETE /bootparameters with non-existent host. API response body -- name: Perform DELETE against bootparameters with non-existent host - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s2b0n0 - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 19. GET /bootparameters with non-existent nid. API response code -# 20. GET /bootparameters with non-existent nid. API response body -- name: Perform GET against bootparameters with non-existent nid - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: GET - verify: !bool "{verify}" - params: - nid: 2147483647 - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 21. DISABLED CASMHMS-5817 PATCH /bootparameters with non-existent nid. API response code -# 22. DISABLED CASMHMS-5817 PATCH /bootparameters with non-existent nid. API response body -# - name: Perform PATCH against bootparameters with non-existent nid -# request: -# url: "{bss_base_url}/boot/v1/bootparameters" -# method: PATCH -# verify: !bool "{verify}" -# json: -# nids: -# - 2147483647 -# response: -# status_code: 404 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: map -# required: True -# mapping: -# type: -# type: str -# required: True -# title: -# type: str -# required: True -# detail: -# type: str -# required: False -# instance: -# type: str -# required: False -# status: -# type: int -# required: False - -# 23. DELETE /bootparameters with non-existent nid. API response code -# 24. DELETE /bootparameters with non-existent nid. API response body -- name: Perform DELETE against bootparameters with non-existent nid - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - nids: - - 2147483647 - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 25. GET /bootparameters with non-existent mac address. API response code -# 26. GET /bootparameters with non-existent mac address. API response body -- name: Perform GET against bootparameters with non-existent MAC address - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: GET - verify: !bool "{verify}" - params: - mac: 0e:ff:ff:ff:ff:ff - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -# 27. DISABLED CASMHMS-5816 PATCH /bootparameters with non-existent mac address. API response code -# 28. DISABLED CASMHMS-5816 PATCH /bootparameters with non-existent mac address. API response body -# - name: Perform PATCH against bootparameters with non-existent host -# request: -# url: "{bss_base_url}/boot/v1/bootparameters" -# method: PATCH -# verify: !bool "{verify}" -# json: -# macs: -# - 0e:ff:ff:ff:ff:ff -# response: -# status_code: 404 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: map -# required: True -# mapping: -# type: -# type: str -# required: True -# title: -# type: str -# required: True -# detail: -# type: str -# required: False -# instance: -# type: str -# required: False -# status: -# type: int -# required: False - -# 29. DISABLED CASMHMS-5817 DELETE /bootparameters with non-existent mac address. API response code -# 30. DISABLED CASMHMS-5817 DELETE /bootparameters with non-existent mac address. API response body -# - name: Perform DELETE against bootparameters with non-existent mac address -# request: -# url: "{bss_base_url}/boot/v1/bootparameters" -# method: DELETE -# verify: !bool "{verify}" -# json: -# macs: -# - 0e:ff:ff:ff:ff:ff -# response: -# status_code: 404 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: map -# required: True -# mapping: -# type: -# type: str -# required: True -# title: -# type: str -# required: True -# detail: -# type: str -# required: False -# instance: -# type: str -# required: False -# status: -# type: int -# required: False diff --git a/test/ct/api/2-disruptive/test_bootparameters.tavern.yaml b/test/ct/api/2-disruptive/test_bootparameters.tavern.yaml deleted file mode 100644 index 47c2796..0000000 --- a/test/ct/api/2-disruptive/test_bootparameters.tavern.yaml +++ /dev/null @@ -1,1441 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for the BSS bootparameters API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIBootparameters - -stages: -- name: Delete existing test bootparameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - -- name: Create Bootparameter with xname - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 201 - -- name: Ensure that the BSS bootparameters can be retrieved - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - macs: - type: seq - sequence: - - type: str - nids: - type: seq - sequence: - - type: int - params: - type: str - kernel: - type: str - initrd: - type: str - cloud-init: - type: map - allowempty: true - -- name: Delete testing bootparameters by xname - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - response: - status_code: 200 - -- name: Delete testing bootparameters by kernel - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - response: - status_code: 200 - -- name: Delete testing bootparameters by initrd - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - ---- -test_name: bssAPIBootparameterXnameAsIdentifier - -stages: -- name: Delete existing test bootparameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - -- name: Create Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 201 - headers: - BSS-Referral-Token: !anystr - -- name: Create duplicate Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Retrieve created Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?name=x9999c0s1b0n0" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s1b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Replace Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - params: console=tty0 console=ttyS0,115200 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - response: - status_code: 200 - headers: - BSS-Referral-Token: !anystr - -- name: Retrieve replaced Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?name=x9999c0s1b0n0" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s1b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 console=ttyS0,115200 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Update Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PATCH - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - response: - status_code: 200 - -- name: Retrieve replaced Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?name=x9999c0s1b0n0" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s1b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 console=ttyS0,115200 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Delete Bootparameters with xname as host - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - response: - status_code: 200 - -- name: Retrieve deleted Bootparameters with xname specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?name=x9999c0s1b0n0" - method: GET - verify: !bool "{verify}" - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Delete Bootparameters with xname as host - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - ---- -test_name: bssAPIBootparameterMultipleHosts - -stages: -- name: Delete existing test bootparameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n0 - - x9999c0s6b0n1 - - x9999c0s6b0n2 - -- name: Create Bootparameters with multiple hosts x9999c0s6b0n[0,1] - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n0 - - x9999c0s6b0n1 - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - response: - status_code: 201 - headers: - BSS-Referral-Token: !anystr - -- name: Verify bootparameter for x9999c0s6b0n0 was created - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n0 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Verify bootparameter for x9999c0s6b0n1 was created - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n1 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n1 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Update bootparameter for only x9999c0s6b0n1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PATCH - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n1 - params: console=tty0 updated - response: - status_code: 200 - -- name: Verify bootparameter for x9999c0s6b0n0 remains unchanged - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n0 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Verify bootparameter for x9999c0s6b0n1 was updated - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n1 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n1 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 updated - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Replace bootparameters with multiple hosts x9999c0s6b0n[0,1] - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n0 - - x9999c0s6b0n1 - params: console=tty0 replaced - kernel: s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - response: - status_code: 200 - headers: - BSS-Referral-Token: !anystr - -- name: Verify bootparameter for x9999c0s6b0n0 was updated - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n0 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 replaced - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Verify bootparameter for x9999c0s6b0n1 was updated - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n1 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n1 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 replaced - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Create and replace bootparamaters with multiple hosts x9999c0s6b0n[1, 2] - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n1 - - x9999c0s6b0n2 - params: console=tty0 create_replaced - kernel: s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - response: - status_code: 200 - headers: - BSS-Referral-Token: !anystr - -- name: Verify bootparameter for x9999c0s6b0n0 was unchanged - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n0 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 replaced - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Verify bootparameter for x9999c0s6b0n1 was updated - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n1 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n1 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 create_replaced - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Verify bootparameter for x9999c0s6b0n2 was created - request: - url: "{bss_base_url}/boot/v1/bootparameters" - params: - name: x9999c0s6b0n2 - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s6b0n2 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 create_replaced - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" diff --git a/test/ct/api/2-disruptive/test_cloud-init.negative.tavern.yaml b/test/ct/api/2-disruptive/test_cloud-init.negative.tavern.yaml deleted file mode 100644 index e2a189f..0000000 --- a/test/ct/api/2-disruptive/test_cloud-init.negative.tavern.yaml +++ /dev/null @@ -1,221 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern negative test cases for the BSS bootparameters API -# Author: Ryan Sjostrand -# Service: Boot Script Service - -# HMS test metrics test cases: 18 -# 1. DELETE /meta-data API response code -# 2. PATCH /meta-data API response code -# 3. POST /meta-data API response code -# 4. PUT /meta-data API response code -# 5. GET /meta-data?key={key} Retrieve a non-existent key. API response code -# 6. GET /meta-data?key={key} Retrieve a non-existent key. API response body -# 7. GET /meta-data?key=this.key.does.not.exist Retrieve a non-existent nested key. API response code -# 8. GET /meta-data?key=this.key.does.not.exist Retrieve a non-existent nested key. API response body - -# 9. DELETE /user-data API response code -# 10. PATCH /user-data API response code -# 11. POST /user-data API response code -# 12. PUT /user-data API response code -# -# 13. DELETE /phone-home API response code -# 14. PATCH /phone-home API response code -# 15. PUT /phone-home API response code -# 16. GET /phone-home API response code -# 17. POST /phone-home with json payload API response code -# 18. POST /phone-home with malformed json payload API response code - ---- - -test_name: bssAPIcloudinitMetaDataNegative - -stages: -# 1. DELETE /meta-data API response code -- name: Perform DELETE against /meta-data - request: - url: "{bss_base_url}/meta-data" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 - -# 2. PATCH /meta-data API response code -- name: Perform PATCH against /meta-data - request: - url: "{bss_base_url}/meta-data" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -# 3. POST /meta-data API response code -- name: Perform POST against /meta-data - request: - url: "{bss_base_url}/meta-data" - method: POST - verify: !bool "{verify}" - response: - status_code: 405 - -# 4. PUT /meta-data API response code -- name: Perform PUT against /meta-data - request: - url: "{bss_base_url}/meta-data" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 - -# 5. GET /meta-data?key={key} Retrieve a non-existent key. API response code -# 6. GET /meta-data?key={key} Retrieve a non-existent key. API response body -- name: Query /meta-data for non-existent key - request: - url: "{bss_base_url}/meta-data" - method: GET - verify: !bool "{verify}" - params: - key: not-a-valid-metadata-key - response: - status_code: 404 - json: - type: about:blank - title: Not Found - status: 404 - detail: Not Found - -# 7. GET /meta-data?key=this.key.does.not.exist Retrieve a non-existent nested key. API response code -# 8. GET /meta-data?key=this.key.does.not.exist Retrieve a non-existent nested key. API response body -- name: Query cloud-init meta-data for a non-existent nested value - request: - url: "{bss_base_url}/meta-data" - method: GET - verify: !bool "{verify}" - params: - key: this.value.does.not.exist - response: - status_code: 404 - json: - type: about:blank - title: Not Found - status: 404 - detail: Not Found - ---- -test_name: bssAPIcloudinitUserDataNegative - -stages: -# 9. DELETE /user-data API response code -- name: Perform DELETE against /user-data - request: - url: "{bss_base_url}/user-data" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 - -# 10. PATCH /user-data API response code -- name: Perform PATCH against /user-data - request: - url: "{bss_base_url}/user-data" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -# 11. POST /user-data API response code -- name: Perform POST against /user-data - request: - url: "{bss_base_url}/user-data" - method: POST - verify: !bool "{verify}" - response: - status_code: 405 - -# 12. PUT /user-data API response code -- name: Perform PUT against /user-data - request: - url: "{bss_base_url}/user-data" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 - ---- -test_name: bssAPIcloudinitPhoneHomeNegative - -stages: -# 13. DELETE /phone-home API response code -- name: Perform DELETE against /phone-home - request: - url: "{bss_base_url}/phone-home" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 - -# 14. PATCH /phone-home API response code -- name: Perform GET against /phone-home - request: - url: "{bss_base_url}/phone-home" - method: GET - verify: !bool "{verify}" - response: - status_code: 405 - -# 15. PUT /phone-home API response code -- name: Perform PATCH against /phone-home - request: - url: "{bss_base_url}/phone-home" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -# 16. GET /phone-home API response code -- name: Perform PUT against /phone-home - request: - url: "{bss_base_url}/phone-home" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 - -# 17. POST /phone-home with json payload API response code -- name: Perform POST against /phone-home without json payload - request: - url: "{bss_base_url}/phone-home" - method: POST - verify: !bool "{verify}" - response: - status_code: 400 - -# 18. POST /phone-home with malformed json payload API response code -- name: Perform POST against /phone-home with malformed json payload - request: - url: "{bss_base_url}/phone-home" - method: POST - verify: !bool "{verify}" - data: "This is not json" - response: - status_code: 400 diff --git a/test/ct/api/2-disruptive/test_cloud-init.tavern.yaml b/test/ct/api/2-disruptive/test_cloud-init.tavern.yaml deleted file mode 100644 index 7070eae..0000000 --- a/test/ct/api/2-disruptive/test_cloud-init.tavern.yaml +++ /dev/null @@ -1,351 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for BSS cloud-init API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIcloudinit - -stages: -- name: Remove any test HSM EthernetInterfaces for the CT Test container if they exist - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - -- name: Remove any test HSM State Components if they exist - request: - url: "{hsm_base_url}/hsm/v2/State/Components/x9999c0s1b0n0" - method: DELETE - verify: !bool "{verify}" - -# Please note that this stage is a hack to retrieve and save the IP address of this container into -# a variable. Perhaps a plugin might be better here. -- name: Retrieve test container IP address - request: - # The endpoint that we hit doesn't really matter, just - url: "{bss_base_url}/boot/v1/service/status" - method: GET - verify: !bool "{verify}" - response: - save: - $ext: - function: bss_test_utils:save_ip_address_of_test_container - -- name: Create test HSM EthernetInterfaces for the CT Test container - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces" - method: POST - verify: !bool "{verify}" - json: - MACAddress: "0e:ff:ff:ff:ff:fe" - ComponentID: "x9999c0s1b0n0" - Description: "Created by BSS CT Tavern Tests" - IPAddresses: - - IPAddress: "{test_container_ip_address}" - - response: - status_code: 201 - -- name: Create test Component in HSM State Components - request: - url: "{hsm_base_url}/hsm/v2/State/Components" - method: POST - verify: !bool "{verify}" - json: - Components: - - ID: x9999c0s1b0n0 - Class: River - State: "Off" - Role: "Management" - SubRole: "Worker" - response: - status_code: 204 - -- name: Create or update Bootparameter for node with cloud-init data - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - cloud-init: - meta-data: - meta-data-key: "foo" - nested-data: - foo: bar - user-data: - user-data-key: "bar" - response: - status_code: 200 - -- name: Perform POST against /hosts to force a sync with HSM - request: - url: "{bss_base_url}/boot/v1/hosts" - method: POST - verify: !bool "{verify}" - response: - status_code: 204 - delay_after: 2 - -- name: Query for cloud-init user-data for the node - # After forcing BSS to sync with HSM it may take a little bit for BSS to become aware - # of the updated IP address for the test node. - # max_retries: 5 - # delay_after: 1 - request: - url: "{bss_base_url}/user-data" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - headers: - content-type: text/yaml - - # The Response is yaml and not json. Tavern currently does not support yaml responses. - # So a external function was made to perform some simple validation. - # - # A response similar to following is expected: - # - # #cloud-config - # local-hostname: x9999c0s1b0n0 - # user-data-key: bar - verify_response_with: - # cloud-init user data should start with "#cloud-config" - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "#cloud-config" - - function: bss_test_utils:validate_yaml_simple - extra_kwargs: - expected: - local-hostname: x9999c0s1b0n0 - user-data-key: bar - -- name: Query for cloud-init meta-data for node - request: - url: "{bss_base_url}/meta-data" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - mapping: - Global: - type: map - allowempty: true - instance-id: - type: str - pattern: "^x9999c0s1b0n0" - local-hostname: - type: str - enum: - - x9999c0s1b0n0 - meta-data-key: - type: str - enum: - - foo - shasta-type: - type: str - enum: - - Management - shasta-role: - type: str - enum: - - Worker - nested-data: - type: map - mapping: - foo: - type: str - enum: - - bar - -- name: Query cloud-init meta-data for a particular key - request: - url: "{bss_base_url}/meta-data" - method: GET - verify: !bool "{verify}" - params: - key: meta-data-key - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: str - enum: - - foo - -# Disabled TODO opened ticket -# - name: Query cloud-init meta-data for a nested value -# request: -# url: "{bss_base_url}/meta-data" -# method: GET -# verify: !bool "{verify}" -# params: -# key: nested-data.foo -# response: -# status_code: 200 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: str -# enum: -# - bar - -- name: Phone home back to cloud-init with POST to /phone-home - request: - url: "{bss_base_url}/phone-home" - method: POST - verify: !bool "{verify}" - json: - pub_key_dsa: "pub_key_dsa_value" - pub_key_rsa: "pub_key_rsa_value" - pub_key_ecdsa: "pub_key_ecdsa_value" - pub_key_ed25519: "pub_key_ed25519_value" - instance_id: "instance_id_value" - hostname: "hostname_value" - fqdn: "fqdn_value" - - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - x9999c0s1b0n0 - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: map - mapping: - meta-data-key: - type: str - enum: - - foo - nested-data: - type: map - mapping: - foo: - type: str - enum: - - bar - user-data: - type: map - mapping: - user-data-key: - type: str - enum: - - bar - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "pub_key_dsa_value" - pub_key_rsa: - type: str - enum: - - "pub_key_rsa_value" - pub_key_ecdsa: - type: str - enum: - - "pub_key_ecdsa_value" - pub_key_ed25519: - type: str - enum: - - "pub_key_ed25519_value" - instance_id: - type: str - enum: - - "instance_id_value" - hostname: - type: str - enum: - - "hostname_value" - fqdn: - type: str - enum: - - "fqdn_value" - -- name: Remove test HSM EthernetInterfaces for the CT Test container - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 200 - -- name: Remove test component from HSM State Components - request: - url: "{hsm_base_url}/hsm/v2/State/Components/x9999c0s1b0n0" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 200 - diff --git a/test/ct/api/2-disruptive/test_dumpstate.negative.yaml b/test/ct/api/2-disruptive/test_dumpstate.negative.yaml deleted file mode 100644 index 806bc1d..0000000 --- a/test/ct/api/2-disruptive/test_dumpstate.negative.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern negative test cases for BSS dumpstate API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIdumpstateNegative - -stages: -- name: Perform DELETE against /dumpstate - request: - url: "{bss_base_url}/boot/v1/dumpstate" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform PATCH against /dumpstate - request: - url: "{bss_base_url}/boot/v1/dumpstate" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform POST against /dumpstate - request: - url: "{bss_base_url}/boot/v1/dumpstate" - method: POST - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform PUT against /dumpstate - request: - url: "{bss_base_url}/boot/v1/dumpstate" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 diff --git a/test/ct/api/2-disruptive/test_endpoint_history.negative.tavern.yaml b/test/ct/api/2-disruptive/test_endpoint_history.negative.tavern.yaml deleted file mode 100644 index 60b804d..0000000 --- a/test/ct/api/2-disruptive/test_endpoint_history.negative.tavern.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern negative test cases for BSS endpoint history API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIendpointHistoryNegative - -stages: -- name: Perform DELETE against /endpoint-history - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform PATCH against /endpoint-history - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform PUT against /endpoint-history - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform POST against /endpoint-history - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: POST - verify: !bool "{verify}" - response: - status_code: 405 - diff --git a/test/ct/api/2-disruptive/test_endpoint_history.tavern.yaml b/test/ct/api/2-disruptive/test_endpoint_history.tavern.yaml deleted file mode 100644 index 6a35cea..0000000 --- a/test/ct/api/2-disruptive/test_endpoint_history.tavern.yaml +++ /dev/null @@ -1,170 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for BSS endpoint history API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIendpointHistory - -stages: -- name: Perform GET against /endpoint-history - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - sequence: - - type: map - mapping: - name: - type: str - endpoint: - type: str - enum: - - bootscript - - user-data - last_epoch: - type: int - -- name: Perform GET against /endpoint-history with name - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - params: - name: x9999c0s1b0n0 - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - sequence: - - type: map - mapping: - name: - type: str - endpoint: - type: str - enum: - - bootscript - - user-data - last_epoch: - type: int - -# DISABLED CASMHMS-5814 BSS Endpoint History returns 500 status code when specifying only endpoint query parameter. -# - name: Perform GET against /endpoint-history with endpoint bootscript -# request: -# url: "{bss_base_url}/boot/v1/endpoint-history" -# method: GET -# verify: !bool "{verify}" -# params: -# endpoint: bootscript -# response: -# status_code: 400 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: seq -# matching: all -# sequence: -# - type: map -# mapping: -# name: -# type: str -# endpoint: -# type: str -# enum: -# - bootscript -# - user-data -# last_epoch: -# type: int - -# DISABLED CASMHMS-5814 BSS Endpoint History returns 500 status code when specifying only endpoint query parameter. -# - name: Perform GET against /endpoint-history with endpoint user-data -# request: -# url: "{bss_base_url}/boot/v1/endpoint-history" -# method: GET -# verify: !bool "{verify}" -# params: -# endpoint: user-data -# response: -# status_code: 400 -# verify_response_with: -# function: tavern.testutils.helpers:validate_pykwalify -# extra_kwargs: -# schema: -# type: seq -# matching: all -# sequence: -# - type: map -# mapping: -# name: -# type: str -# endpoint: -# type: str -# enum: -# - bootscript -# - user-data -# last_epoch: -# type: int - -- name: Perform GET against /endpoint-history with both name and endpoint - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - params: - name: x9999c0s1b0n0 - endpoint: user-data - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - sequence: - - type: map - mapping: - name: - type: str - endpoint: - type: str - enum: - - bootscript - - user-data - last_epoch: - type: int diff --git a/test/ct/api/2-disruptive/test_hosts.negative.tavern.yaml b/test/ct/api/2-disruptive/test_hosts.negative.tavern.yaml deleted file mode 100644 index 5f27ea9..0000000 --- a/test/ct/api/2-disruptive/test_hosts.negative.tavern.yaml +++ /dev/null @@ -1,187 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern negative test cases for BSS hosts API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIhostsNegative - -stages: -- name: Perform DELETE against /hosts - request: - url: "{bss_base_url}/boot/v1/hosts" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform PATCH against /hosts - request: - url: "{bss_base_url}/boot/v1/hosts" - method: PATCH - verify: !bool "{verify}" - response: - status_code: 405 - -- name: Perform PUT against /hosts - request: - url: "{bss_base_url}/boot/v1/hosts" - method: PUT - verify: !bool "{verify}" - response: - status_code: 405 - - ---- -test_name: bssAPIHostsSearchNegative - -stages: -- name: Search BSS hosts with name - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - name: x9999c0s2b0n0 - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - - -- name: Search BSS hosts with NID - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - nid: 2147483647 - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Search BSS hosts with MAC address - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - mac: 0e:ff:ff:ff:ff:ff - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Search BSS hosts with invalid NID - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - nid: 1notANid - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False diff --git a/test/ct/api/2-disruptive/test_hosts.tavern.yaml b/test/ct/api/2-disruptive/test_hosts.tavern.yaml deleted file mode 100644 index a60e20b..0000000 --- a/test/ct/api/2-disruptive/test_hosts.tavern.yaml +++ /dev/null @@ -1,343 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Tavern test cases for BSS hosts API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIhosts - -stages: -- name: Perform POST against /hosts to force a sync with HSM - request: - url: "{bss_base_url}/boot/v1/hosts" - method: POST - verify: !bool "{verify}" - response: - status_code: 204 - -- name: Perform a GET against /hosts to retrieve a list of known hosts - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - sequence: - - type: map - mapping: - ID: - type: str - Type: - type: str - State: - type: str - required: false - Flag: - type: str - required: false - Enabled: - type: bool - required: false - Role: - type: str - required: false - SubRole: - type: str - required: false - NID: - type: int - required: false - NetType: - type: str - required: false - Arch: - type: str - required: false - Class: - type: str - required: false - ReservationDisabled: - type: bool - required: false - Locked: - type: bool - required: false - FQDN: - type: str - required: true - MAC: - type: seq - sequence: - - type: str - required: true - EndpointEnabled: - type: bool - required: true - - ---- -test_name: bssAPIhostsSearch - -stages: -- name: Query HSM State Components for a compute node - request: - url: "{hsm_base_url}/hsm/v2/State/Components?Type=Node&Role=Compute" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_xname: Components[0].ID - node_nid: Components[0].NID - -- name: Query HSM EthernetInterfaces for the compute nodes MAC address - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces?ComponentID={node_xname}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_mac_address: '[0].MACAddress' - -- name: Search BSS hosts with name - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - name: "{node_xname}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - max: 1 - min: 1 - sequence: - - type: map - mapping: - ID: - type: str - enum: - - "{node_xname}" - Type: - type: str - enum: - - Node - State: - type: str - required: false - Flag: - type: str - required: false - Enabled: - type: bool - required: false - Role: - type: str - required: false - NID: - type: int - required: false - NetType: - type: str - required: false - Arch: - type: str - required: false - Class: - type: str - required: false - ReservationDisabled: - type: bool - required: false - Locked: - type: bool - required: false - FQDN: - type: str - required: true - MAC: - type: seq - sequence: - - type: str - required: true - EndpointEnabled: - type: bool - required: true - -- name: Search BSS hosts with NID - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - nid: "{node_nid}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - max: 1 - min: 1 - sequence: - - type: map - mapping: - ID: - type: str - enum: - - "{node_xname}" - Type: - type: str - enum: - - Node - State: - type: str - required: false - Flag: - type: str - required: false - Enabled: - type: bool - required: false - Role: - type: str - required: false - NID: - type: int - required: false - NetType: - type: str - required: false - Arch: - type: str - required: false - Class: - type: str - required: false - ReservationDisabled: - type: bool - required: false - Locked: - type: bool - required: false - FQDN: - type: str - required: true - MAC: - type: seq - sequence: - - type: str - required: true - EndpointEnabled: - type: bool - required: true - -- name: Search BSS hosts with MAC address - request: - url: "{bss_base_url}/boot/v1/hosts" - method: GET - verify: !bool "{verify}" - params: - mac: "{node_mac_address}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - max: 1 - min: 1 - sequence: - - type: map - mapping: - ID: - type: str - enum: - - "{node_xname}" - Type: - type: str - enum: - - Node - State: - type: str - required: false - Flag: - type: str - required: false - Enabled: - type: bool - required: false - Role: - type: str - required: false - NID: - type: int - required: false - NetType: - type: str - required: false - Arch: - type: str - required: false - Class: - type: str - required: false - ReservationDisabled: - type: bool - required: false - Locked: - type: bool - required: false - FQDN: - type: str - required: true - MAC: - type: seq - sequence: - - type: str - required: true - EndpointEnabled: - type: bool - required: true diff --git a/test/ct/api/2-disruptive/test_zzz_cleanup.tavern.yaml b/test/ct/api/2-disruptive/test_zzz_cleanup.tavern.yaml deleted file mode 100644 index d25cefc..0000000 --- a/test/ct/api/2-disruptive/test_zzz_cleanup.tavern.yaml +++ /dev/null @@ -1,234 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Disruptive Test clean -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: Disruptive Test clean - -stages: -- name: Remove any test HSM EthernetInterfaces for the CT Test container if they exist - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 - -- name: Remove any test HSM State Components if they exist - request: - url: "{hsm_base_url}/hsm/v2/State/Components/x9999c0s1b0n0" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters for x9999c0s1b0n0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s1b0n0 - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters for x9999c0s6b0n0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n0 - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters for x9999c0s6b0n1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n1 - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters for x9999c0s6b0n2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - x9999c0s6b0n2 - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000003/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 3 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000003/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Remove test HSM EthernetInterfaces for the CT Test container - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 - - -- name: Remove test component from HSM State Components - request: - url: "{hsm_base_url}/hsm/v2/State/Components/x9999c0s1b0n0" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 diff --git a/test/ct/api/3-destructive/test_bootparameters.tavern.yaml b/test/ct/api/3-destructive/test_bootparameters.tavern.yaml deleted file mode 100644 index b17ed29..0000000 --- a/test/ct/api/3-destructive/test_bootparameters.tavern.yaml +++ /dev/null @@ -1,979 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Destructive Tavern test cases for BSS bootparameters API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIBootparameterMACAddressAsIdentifier - -stages: -- name: Query HSM State Components for a compute node - request: - url: "{hsm_base_url}/hsm/v2/State/Components?Type=Node&Role=Compute" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_xname: Components[0].ID - -- name: Query HSM EthernetInterfaces for the compute nodes MAC address - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces?ComponentID={node_xname}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_mac_address: '[0].MACAddress' - -- name: Delete existing test bootparameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - -- name: Create or Update Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - headers: - BSS-Referral-Token: !anystr - -- name: Create duplicate Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Retrieve created Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?mac={node_mac_address}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - "{node_xname}" - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Replace Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - params: console=tty0 console=ttyS0,115200 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - response: - status_code: 200 - headers: - BSS-Referral-Token: !anystr - -- name: Retrieve replaced Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?mac={node_mac_address}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - "{node_xname}" - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 console=ttyS0,115200 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Update Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PATCH - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - kernel: s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - response: - status_code: 200 - -- name: Retrieve replaced Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?mac={node_mac_address}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - "{node_xname}" - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 console=ttyS0,115200 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Delete Bootparameters with mac as identifer - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - response: - status_code: 200 - -- name: Retrieve deleted Bootparameters with mac specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?mac={node_mac_address}" - method: GET - verify: !bool "{verify}" - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Delete Bootparameters with mac as identifer - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - macs: - - "{node_mac_address}" - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Delete testing bootparameters by kernel 0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - response: - status_code: 200 -- name: Delete testing bootparameters by kernel 1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - response: - status_code: 200 -- name: Delete testing bootparameters by kernel 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - response: - status_code: 200 - -- name: Delete testing bootparameters by initrd 0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 -- name: Delete testing bootparameters by initrd 1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 -- name: Delete testing bootparameters by initrd 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - ---- -test_name: bssAPIBootparameterNIDAsIdentifier - -stages: -- name: Query HSM State Components for a compute node - request: - url: "{hsm_base_url}/hsm/v2/State/Components?Type=Node&Role=Compute" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_xname: Components[0].ID - node_nid: Components[0].NID - -- name: Delete existing test bootparameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - -- name: Create Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 201 - headers: - BSS-Referral-Token: !anystr - -- name: Create duplicate Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: POST - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Retrieve created Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?nid={node_nid}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - "{node_xname}" - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Replace Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - params: console=tty0 console=ttyS0,115200 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - response: - status_code: 200 - headers: - BSS-Referral-Token: !anystr - -- name: Retrieve replaced Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?nid={node_nid}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - "{node_xname}" - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 console=ttyS0,115200 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Update Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PATCH - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - kernel: s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - response: - status_code: 200 - -- name: Retrieve replaced Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?nid={node_nid}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - range: - max: 1 - matching: all - sequence: - - type: map - mapping: - hosts: - type: seq - sequence: - - type: str - enum: - - "{node_xname}" - macs: - type: seq - range: - max: 0 - sequence: - - type: str - nids: - type: seq - range: - max: 0 - sequence: - - type: int - params: - type: str - enum: - - console=tty0 console=ttyS0,115200 - kernel: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - initrd: - type: str - enum: - - s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - cloud-init: - type: map - allowempty: true - mapping: - meta-data: - type: none - user-data: - type: none - phone-home: - type: map - mapping: - pub_key_dsa: - type: str - enum: - - "" - pub_key_rsa: - type: str - enum: - - "" - pub_key_ecdsa: - type: str - enum: - - "" - pub_key_ed25519: - type: str - enum: - - "" - instance_id: - type: str - enum: - - "" - hostname: - type: str - enum: - - "" - fqdn: - type: str - enum: - - "" - -- name: Delete Bootparameters with NID as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - response: - status_code: 200 - -- name: Retrieve deleted Bootparameters with NID specified as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters?nid={node_nid}" - method: GET - verify: !bool "{verify}" - response: - status_code: 404 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False - -- name: Delete Bootparameters with NID as identifier - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - nids: - - !int "{node_nid}" - response: - status_code: 400 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: map - required: True - mapping: - type: - type: str - required: True - title: - type: str - required: True - detail: - type: str - required: False - instance: - type: str - required: False - status: - type: int - required: False diff --git a/test/ct/api/3-destructive/test_bootscript.tavern.yaml b/test/ct/api/3-destructive/test_bootscript.tavern.yaml deleted file mode 100644 index 41a20d4..0000000 --- a/test/ct/api/3-destructive/test_bootscript.tavern.yaml +++ /dev/null @@ -1,349 +0,0 @@ -# MIT License -# -# (C) Copyright [2022-2023] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Destructive Tavern test cases for BSS bootscript API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIbootscript - -stages: -- name: Query HSM State Components for a compute node - request: - url: "{hsm_base_url}/hsm/v2/State/Components?Type=Node&Role=Compute" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_xname: Components[0].ID - node_nid: Components[0].NID - -- name: Query HSM EthernetInterfaces for the compute nodes MAC address - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces?ComponentID={node_xname}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_mac_address: '[0].MACAddress' - -- name: Create or update Bootparameter for compute node - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - "{node_xname}" - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - -- name: Query bootscript by xname - # Sometimes BSS returns a bootscript to re-attempt getting a bootscript, and this normally - # happens when BSS is syncing with HSM. Add retries to account for this. - # Example: - # #!ipxe - # sleep 10 - # chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=00:40:a6:42:3a:58&retry=1 - max_retries: 15 - delay_after: 2 - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - name: "{node_xname}" - response: - status_code: 200 - headers: - content-type: text/plain; charset=UTF-8 - verify_response_with: - # Verify that this is a ipxe bootscript - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "#!ipxe" - - # Verify that BSS generated/expanded S3 urls - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel http[s]?:\/\/.+/boot-images/00000000-0000-0000-0000-000000000000\/kernel' - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'initrd http[s]?:\/\/.+/boot-images/00000000-0000-0000-0000-000000000000\/initrd' - - # Verify that provided kernel parameter exists on the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+console.tty0' - - # Verify the node xname has been passed onto the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+xname={node_xname}' - - # Verify the node nid has been passed onto the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+nid={node_nid}' - - # Verify BSS referral token is present - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+bss_referral_token=' - -- name: Query bootscript by MAC address - # Sometimes BSS returns a bootscript to re-attempt getting a bootscript, and this normally - # happens when BSS is syncing with HSM. Add retries to account for this. - # Example: - # #!ipxe - # sleep 10 - # chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=00:40:a6:42:3a:58&retry=1 - max_retries: 15 - delay_after: 2 - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - mac: "{node_mac_address}" - response: - status_code: 200 - headers: - content-type: text/plain; charset=UTF-8 - -- name: Query bootscript by NID - # Sometimes BSS returns a bootscript to re-attempt getting a bootscript, and this normally - # happens when BSS is syncing with HSM. Add retries to account for this. - # Example: - # #!ipxe - # sleep 10 - # chain https://api-gw-service-nmn.local/apis/bss/boot/v1/bootscript?mac=00:40:a6:42:3a:58&retry=1 - max_retries: 15 - delay_after: 2 - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - nid: "{node_nid}" - response: - status_code: 200 - headers: - content-type: text/plain; charset=UTF-8 - verify_response_with: - # Verify that this is a ipxe bootscript - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "#!ipxe" - - # Verify that BSS generated/expanded S3 urls - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel http[s]?:\/\/.+/boot-images/00000000-0000-0000-0000-000000000000\/kernel' - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'initrd http[s]?:\/\/.+/boot-images/00000000-0000-0000-0000-000000000000\/initrd' - - # Verify that provided kernel parameter exists on the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+console.tty0' - - # Verify the node xname has been passed onto the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+xname={node_xname}' - - # Verify the node nid has been passed onto the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+nid={node_nid}' - - # Verify BSS referral token is present - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+bss_referral_token=' - -- name: Ensure the boot script service can retrieve a bootscript for a particular nid with the number of retries set to 7 - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - nid: "{node_nid}" - retry: 7 - response: - status_code: 200 - headers: - content-type: text/plain; charset=UTF-8 - verify_response_with: - # Verify that this is a ipxe bootscript - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "#!ipxe" - - # Verify the retry counter incremented by 1 - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "retry=8" - ---- -test_name: bssAPIBootscriptByHSMRole - -stages: -- name: Query HSM State Components for a compute node - request: - url: "{hsm_base_url}/hsm/v2/State/Components?Type=Node&Role=Compute" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_xname: Components[0].ID - node_nid: Components[0].NID - -- name: Query HSM EthernetInterfaces for the compute nodes MAC address - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces?ComponentID={node_xname}" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_mac_address: '[0].MACAddress' - -- name: Delete existing test bootparameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - "{node_xname}" - -- name: Create or update Bootparameter for Compute nodes - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - Compute - params: console=tty0 compute_node - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - - -- name: Query bootscript with MAC address - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - mac: "{node_mac_address}" - response: - status_code: 200 - headers: - content-type: text/plain; charset=UTF-8 - verify_response_with: - # Verify that this is a ipxe bootscript - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "#!ipxe" - - # Verify compute_node is present - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "kernel --name .+compute_node" - - # Verify the node xname has been passed onto the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+xname={node_xname}' - - # Verify the node nid has been passed onto the kernel command line - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: 'kernel --name .+nid={node_nid}' ---- -test_name: bssAPIbootscriptUnknown - -stages: -- name: Create or update Bootparameter for unknown hosts - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - Unknown-x86_64 - params: console=tty0 unknown_hardware - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - -- name: Query for bootscript for unknown hardware - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - mac: 0e:ff:ff:ff:ff:ff - arch: x86_64 - response: - status_code: 200 - headers: - content-type: text/plain; charset=UTF-8 - verify_response_with: - # Verify that this is a ipxe bootscript - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "#!ipxe" - - # Verify the retry counter incremented by 1 - - function: bss_test_utils:better_validate_regex - extra_kwargs: - expression: "unknown_hardware" - -- name: Delete existing unknown boot parameters if it exists - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - Unknown-x86_64 - response: - status_code: 200 diff --git a/test/ct/api/3-destructive/test_endpoint_history.tavern.yaml b/test/ct/api/3-destructive/test_endpoint_history.tavern.yaml deleted file mode 100644 index 35f2518..0000000 --- a/test/ct/api/3-destructive/test_endpoint_history.tavern.yaml +++ /dev/null @@ -1,261 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Destructive Tavern test cases for BSS endpoint history API -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: bssAPIendpointHistory - -stages: -- name: Remove any test HSM EthernetInterfaces for the CT Test container if they exist - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - -- name: Query HSM State Components for a compute node - request: - url: "{hsm_base_url}/hsm/v2/State/Components?Type=Node&Role=Compute" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - save: - json: - node_xname: Components[0].ID - -- name: Create or Update Bootparameter for compute node - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: PUT - verify: !bool "{verify}" - json: - hosts: - - "{node_xname}" - params: console=tty0 - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: 200 - -# Please note that this stage is a hack to retrieve and save the IP address of this container into -# a variable. Perhaps a plugin might be better here. -- name: Retrieve test container IP address - request: - # The endpoint that we hit doesn't really matter, just - url: "{bss_base_url}/boot/v1/service/status" - method: GET - verify: !bool "{verify}" - response: - save: - $ext: - function: bss_test_utils:save_ip_address_of_test_container - -- name: Create test HSM EthernetInterfaces for the CT Test container - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces" - method: POST - verify: !bool "{verify}" - json: - MACAddress: "0e:ff:ff:ff:ff:fe" - ComponentID: "{node_xname}" - Description: "Created by BSS CT Tavern Tests" - IPAddresses: - - IPAddress: "{test_container_ip_address}" - -- name: Perform POST against /hosts to force a sync with HSM - request: - url: "{bss_base_url}/boot/v1/hosts" - method: POST - verify: !bool "{verify}" - response: - status_code: 204 - -- name: Query bootscript by xname - request: - url: "{bss_base_url}/boot/v1/bootscript" - method: GET - verify: !bool "{verify}" - params: - name: "{node_xname}" - response: - status_code: 200 - # Note the content of the response is not being tested, as that is done in other tests - -- name: Query endpoint-history with node xname, and verify state - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - params: - name: "{node_xname}" - endpoint: bootscript - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - min: 1 - max: 1 - sequence: - - type: map - mapping: - name: - type: str - enum: - - "{node_xname}" - endpoint: - type: str - enum: - - bootscript - last_epoch: - type: int - range: - min: 0 # If the epoch time is 0, then that means the endpoint wasn't really queried. - -# Verify that there are no matches when using a bad endpoint. -- name: Query endpoint-history with bad endpoint - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - params: - name: "{node_xname}" - endpoint: bootscript-bad - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - min: 0 - max: 0 - sequence: - - type: map - mapping: - name: - type: str - endpoint: - type: str - last_epoch: - type: int - -- name: Query for cloud-init user-data for the node - request: - url: "{bss_base_url}/user-data" - method: GET - verify: !bool "{verify}" - response: - status_code: 200 - # Note the content of the response is not being tested, as that is done in other tests - -- name: Query endpoint-history with node xname, and verify state - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - params: - name: "{node_xname}" - endpoint: user-data - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - min: 1 - max: 1 - sequence: - - type: map - mapping: - name: - type: str - enum: - - "{node_xname}" - endpoint: - type: str - enum: - - user-data - last_epoch: - type: int - range: - min: 1 # If the epoch time is 0, then that means the endpoint wasn't really queried. - -# Verify that there are no matches when using a prefix of the xname. -- name: Query endpoint-history with xname prefix - request: - url: "{bss_base_url}/boot/v1/endpoint-history" - method: GET - verify: !bool "{verify}" - params: - name: x1000 - response: - status_code: 200 - verify_response_with: - function: tavern.testutils.helpers:validate_pykwalify - extra_kwargs: - schema: - type: seq - matching: all - range: - min: 0 - max: 0 - sequence: - - type: map - mapping: - name: - type: str - endpoint: - type: str - last_epoch: - type: int - -- name: Remove test HSM EthernetInterfaces for the CT Test container - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - response: - status_code: 200 - -- name: Remove test Bootparameter for compute node - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - "{node_xname}" - response: - status_code: 200 diff --git a/test/ct/api/3-destructive/test_zzz_cleanup.tavern.yaml b/test/ct/api/3-destructive/test_zzz_cleanup.tavern.yaml deleted file mode 100644 index bd0d501..0000000 --- a/test/ct/api/3-destructive/test_zzz_cleanup.tavern.yaml +++ /dev/null @@ -1,166 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Destructive Test clean -# Author: Ryan Sjostrand -# Service: Boot Script Service - ---- -test_name: Destructive Test clean - -stages: -- name: Remove any test HSM EthernetInterfaces for the CT Test container if they exist - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 - -- name: Remove any test HSM State Components if they exist - request: - url: "{hsm_base_url}/hsm/v2/State/Components/x9999c0s1b0n0" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000000/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000001/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by kernel 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - kernel: s3://boot-images/00000000-0000-0000-0000-000000000002/kernel - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 0 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000000/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 1 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000001/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters by initrd 2 - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - initrd: s3://boot-images/00000000-0000-0000-0000-000000000002/initrd - response: - status_code: - - 200 - - 400 - - 404 - -- name: Delete testing bootparameters for Compute role - request: - url: "{bss_base_url}/boot/v1/bootparameters" - method: DELETE - verify: !bool "{verify}" - json: - hosts: - - Compute - response: - status_code: - - 200 - - 400 - - 404 - -- name: Remove test HSM EthernetInterfaces for the CT Test container - request: - url: "{hsm_base_url}/hsm/v2/Inventory/EthernetInterfaces/0efffffffffe" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 - - -- name: Remove test component from HSM State Components - request: - url: "{hsm_base_url}/hsm/v2/State/Components/x9999c0s1b0n0" - method: DELETE - verify: !bool "{verify}" - response: - status_code: - - 200 - - 400 - - 404 diff --git a/test/ct/bss_test_utils.py b/test/ct/bss_test_utils.py deleted file mode 100644 index 2ac5858..0000000 --- a/test/ct/bss_test_utils.py +++ /dev/null @@ -1,75 +0,0 @@ -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -import socket -from box import Box - -import json -import jmespath -import logging -import re - -from tavern.util import exceptions -from tavern.util.dict_util import recurse_access_key,check_keys_match_recursive - -import yaml - -logger = logging.getLogger(__name__) - -def build_hsm_ethernet_interface_for_test_container(): - # Determine the IP of the container - hostname = socket.gethostname() - ip_address = socket.gethostbyname(hostname) - - # Build up a HSM EthernetInterface with this containers IP address - return { - "MACAddress": "0e:ff:ff:ff:ff:fe", - "ComponentID": "x9999c0s1b0n0", - "Description": "Created by BSS CT Tavern Tests", - "IPAddresses": [{ - "IPAddress": ip_address - }] - } - -def save_ip_address_of_test_container(response): - # Determine the IP of the container - hostname = socket.gethostname() - ip_address = socket.gethostbyname(hostname) - - return Box({"test_container_ip_address": ip_address}) - -def better_validate_regex(response, expression): - logger.debug("Matching %s with %s", response.text, expression) - - match = re.search(expression, response.text) - if match is None: - raise exceptions.RegexAccessError(f"No match for regex '{expression}' in response:\n{response.text}") - - return {"regex": Box(match.groupdict())} - - -def validate_yaml_simple(response, expected): - response_data = yaml.safe_load(response.text) - - check_keys_match_recursive(response_data, expected, []) - - return {} diff --git a/test/ct/smoke/smoke.json b/test/ct/smoke/smoke.json deleted file mode 100644 index 2a8f297..0000000 --- a/test/ct/smoke/smoke.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "smoke_test_name": "bss-smoke-tests", - "default_base_url": "http://cray-bss/", - "test_paths": [ - { - "path": "boot/v1/service/version", - "expected_status_code": 200, - "method": "GET", - "body": null, - "headers": {} - }, - { - "path": "boot/v1/service/status", - "expected_status_code": 200, - "method": "GET", - "body": null, - "headers": {} - }, - { - "path": "boot/v1/bootparameters", - "expected_status_code": 200, - "method": "GET", - "body": null, - "headers": {} - }, - { - "path": "boot/v1/dumpstate", - "expected_status_code": 200, - "method": "GET", - "body": null, - "headers": {} - }, - { - "path": "boot/v1/bootscript?nid=0", - "expected_status_code": 200, - "method": "GET", - "body": null, - "headers": {} - }, - { - "path": "boot/v1/hosts", - "expected_status_code": 200, - "method": "GET", - "body": null, - "headers": {} - } - ] -} \ No newline at end of file diff --git a/test/ct/tavern_global_config_ct_test.yaml b/test/ct/tavern_global_config_ct_test.yaml deleted file mode 100644 index abd6514..0000000 --- a/test/ct/tavern_global_config_ct_test.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# This file contains the base common configurations for running pytest tavern tests. It is statically -# generated, because we anticipate the same settings for all CT test containers that inherit from it. -name: tavern_global_configuration -description: common configuration for all tavern invocations -variables: - verify: false - bss_base_url: http://cray-bss:27778 - hsm_base_url: http://cray-smd:27779 - diff --git a/test/ct/wait-for.sh b/test/ct/wait-for.sh deleted file mode 100755 index 24bbddd..0000000 --- a/test/ct/wait-for.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# wait-for.sh; used by runCT.sh to make sure HSM has been populated with data before running. -echo "Initiating..." -URL="http://cray-smd:27779/hsm/v2/State/Components" -sentry=1 -limit=200 -while :; do - length=$(curl --silent ${URL} | jq '.Components | length') - - if [ ! -z "$length" ] && [ "$length" -gt "0" ]; then - echo $URL" is available" - break - fi - - if [ "$sentry" -gt "$limit" ]; then - echo "Failed to connect for $limit, exiting" - exit 1 - fi - - ((sentry++)) - - echo $URL" is unavailable - sleeping" - sleep 1 - -done From 22113819fa63bc4d6b1c78992efc8417f421e684 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 17:54:08 -0700 Subject: [PATCH 04/19] Delete unit test container/script files GitHub Actions (.github/workflows/unit_test.yaml) handles this instead. --- Dockerfile.testing.Dockerfile | 51 ----------------------------- docker-compose.test.unit.yaml | 12 ------- runUnitTest.sh | 61 ----------------------------------- 3 files changed, 124 deletions(-) delete mode 100644 Dockerfile.testing.Dockerfile delete mode 100644 docker-compose.test.unit.yaml delete mode 100755 runUnitTest.sh diff --git a/Dockerfile.testing.Dockerfile b/Dockerfile.testing.Dockerfile deleted file mode 100644 index c7a8837..0000000 --- a/Dockerfile.testing.Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# MIT License -# -# (C) Copyright [2021] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Dockerfile for running bss unit tests. - -### build-base stage ### -# Build base just has the packages installed we need. -FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS build-base - -RUN set -ex \ - && apk -U upgrade \ - && apk add build-base - -### base stage ### -# Base copies in the files we need to test/build. -FROM build-base AS base - -RUN go env -w GO111MODULE=auto - -# Copy all the necessary files to the image. -COPY cmd $GOPATH/src/github.com/Cray-HPE/hms-bss/cmd -COPY pkg $GOPATH/src/github.com/Cray-HPE/hms-bss/pkg -COPY vendor $GOPATH/src/github.com/Cray-HPE/hms-bss/vendor -COPY .version $GOPATH/src/github.com/Cray-HPE/hms-bss/.version - -### testing stage ### -FROM base AS testing - -WORKDIR /go - -# Run unit tests. -CMD ["sh", "-c", "go test -cover -v github.com/Cray-HPE/hms-bss/cmd/boot-script-service"] diff --git a/docker-compose.test.unit.yaml b/docker-compose.test.unit.yaml deleted file mode 100644 index 97e6935..0000000 --- a/docker-compose.test.unit.yaml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3.7' - -networks: - bss: - -services: - unit-tests: - build: - context: . - dockerfile: Dockerfile.testing.Dockerfile - networks: - - bss diff --git a/runUnitTest.sh b/runUnitTest.sh deleted file mode 100755 index 61b69ad..0000000 --- a/runUnitTest.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -# -# MIT License -# -# (C) Copyright [2020-2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -set -x - - -# Configure docker compose -export COMPOSE_PROJECT_NAME=$RANDOM -export COMPOSE_FILE=docker-compose.test.unit.yaml - -echo "COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME}" -echo "COMPOSE_FILE: $COMPOSE_FILE" - - -function cleanup() { - docker-compose down - if ! [[ $? -eq 0 ]]; then - echo "Failed to decompose environment!" - exit 1 - fi - exit $1 -} - - -echo "Starting containers..." -docker-compose build -docker-compose up --exit-code-from unit-tests unit-tests - -test_result=$? - -# Clean up -echo "Cleaning up containers..." -if [[ $test_result -ne 0 ]]; then - echo "Unit tests FAILED!" - cleanup 1 -fi - -echo "Unit tests PASSED!" -cleanup 0 From 4a0dd8ccc03242111391db85915dcdc2abcd7521 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 18:02:59 -0700 Subject: [PATCH 05/19] Makefile: Use git tag version for 'docker' target --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 911f63d..4be1534 100644 --- a/Makefile +++ b/Makefile @@ -53,5 +53,8 @@ ct: ct_image: docker build --no-cache -f test/ct/Dockerfile test/ct/ --tag hms-bss-hmth-test:${VERSION} +BUILD := `git rev-parse --short HEAD` +VERSION := `git describe --tags --abbrev=0` + docker: $(BINARIES) docker build --tag openchami/bss:v$(VERSION)-dirty $(DOCKEROPTS) . From 78652b165b0c2b553b05ed37cc37514af9a1fd60 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 18:25:28 -0700 Subject: [PATCH 06/19] Makefile: Delete irrelevant targets and reorganize Write .version using Git tag when running any make target. --- Makefile | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 4be1534..6d44866 100644 --- a/Makefile +++ b/Makefile @@ -22,39 +22,28 @@ # Service NAME ?= bss -VERSION ?= $(shell cat .version) + +# Version +BUILD := $(shell git rev-parse --short HEAD) +VERSION := $(shell git describe --tags --abbrev=0 | tr -d v | tee .version) BINARIES = boot-script-service bss-init GOOS := $(if $(GOOS),$(GOOS),linux) GOARCH := $(if $(GOARCH),$(GOARCH),amd64) - -all : image unittest ct snyk ct_image - +.PHONY: binaries binaries: $(BINARIES) +.PHONY: docker +docker: $(BINARIES) + docker build --tag openchami/bss:v$(VERSION)-dirty . + %: cmd/%/*.go GOOS=$(GOOS) GOARCH=$(GOARCH) go build -v -tags musl $(LDFLAGS) -o $@ ./$(dir $<) +.PHONY: clean clean: rm -f $(BINARIES) -image: - docker build ${NO_CACHE} --pull ${DOCKER_ARGS} --tag '${NAME}:${VERSION}' . - -unittest: - ./runUnitTest.sh - +.PHONY: snyk snyk: ./runSnyk.sh - -ct: - ./runCT.sh - -ct_image: - docker build --no-cache -f test/ct/Dockerfile test/ct/ --tag hms-bss-hmth-test:${VERSION} - -BUILD := `git rev-parse --short HEAD` -VERSION := `git describe --tags --abbrev=0` - -docker: $(BINARIES) - docker build --tag openchami/bss:v$(VERSION)-dirty $(DOCKEROPTS) . From 5db3518506e8156ae1124870a9d9a31532d33fd2 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 18:31:23 -0700 Subject: [PATCH 07/19] Makefile: Use 'version' target to write the .version file --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6d44866..4d519a1 100644 --- a/Makefile +++ b/Makefile @@ -25,17 +25,23 @@ NAME ?= bss # Version BUILD := $(shell git rev-parse --short HEAD) -VERSION := $(shell git describe --tags --abbrev=0 | tr -d v | tee .version) +VERSION := $(shell git describe --tags --abbrev=0) BINARIES = boot-script-service bss-init GOOS := $(if $(GOOS),$(GOOS),linux) GOARCH := $(if $(GOARCH),$(GOARCH),amd64) +all: version binaries + .PHONY: binaries binaries: $(BINARIES) .PHONY: docker docker: $(BINARIES) - docker build --tag openchami/bss:v$(VERSION)-dirty . + docker build --tag openchami/bss:$(VERSION)-dirty . + +.PHONY: version +version: + @echo '$(VERSION)' | tr -d v | tee .version %: cmd/%/*.go GOOS=$(GOOS) GOARCH=$(GOARCH) go build -v -tags musl $(LDFLAGS) -o $@ ./$(dir $<) From ed61d16a7c6186cc632997c4b41104ca10243599 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 18:36:29 -0700 Subject: [PATCH 08/19] GitHub actions: Run `make version` before building/releasing --- .github/workflows/build_release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index c314977..f0c3c21 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -32,6 +32,8 @@ jobs: with: fetch-tags: 1 fetch-depth: 1 + - name: Set version in .version file + run: make version - name: Unit Tests run: go test -v ./... - name: Release with goreleaser From 23144d9898cd20041e6cbeeb86581ac36a680bff Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Thu, 22 Feb 2024 18:39:57 -0700 Subject: [PATCH 09/19] Delete build_tag_push.sh Handled by Goreleaser. --- build_tag_push.sh | 62 ----------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100755 build_tag_push.sh diff --git a/build_tag_push.sh b/build_tag_push.sh deleted file mode 100755 index 70c60d1..0000000 --- a/build_tag_push.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -IMAGE_NAME="cray-bss" - -usage() { - echo "$FUNCNAME: $0" - echo " -h | prints this help message" - echo " -l | hostname to push to, default localhost"; - echo " -r | repo to push to, default cray"; - echo " -f | forces build with --no-cache and --pull"; - echo ""; - exit 0 -} - - -REPO="cray" -REGISTRY_HOSTNAME="localhost" -FORCE=" " - -while getopts "hfl:r:" opt; do - case $opt in - h) - usage; - exit;; - f) - FORCE=" --no-cache --pull";; - l) - REGISTRY_HOSTNAME=${OPTARG};; - r) - REPO=${OPTARG};; - esac -done - -shift $((OPTIND-1)) - -echo "Building $FORCE and pushing to $REGISTRY_HOSTNAME in repo $REPO" - -set -e -docker build $FORCE -t cray/$IMAGE_NAME . -docker tag cray/$IMAGE_NAME $REGISTRY_HOSTNAME/$REPO/$IMAGE_NAME -docker push $REGISTRY_HOSTNAME/$REPO/$IMAGE_NAME From 31199215fff0b12a611f36cfcf30417428ca77f5 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 2 Aug 2024 13:42:32 -0600 Subject: [PATCH 10/19] Makefile: docker -> container and be able to specify container runtime --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4d519a1..7007345 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ # Service NAME ?= bss +DOCKER ?= docker # Version BUILD := $(shell git rev-parse --short HEAD) @@ -36,8 +37,8 @@ all: version binaries binaries: $(BINARIES) .PHONY: docker -docker: $(BINARIES) - docker build --tag openchami/bss:$(VERSION)-dirty . +container: $(BINARIES) + $(DOCKER) build --tag openchami/bss:$(VERSION)-dirty $(DOCKEROPTS) . .PHONY: version version: From 61ec65affe559db59c35a2cbdb3615bc2ae07360 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 2 Aug 2024 13:52:11 -0600 Subject: [PATCH 11/19] Don't track .version file, generated it when anything is built --- .gitignore | 1 + .version | 1 - Makefile | 11 +++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 .version diff --git a/.gitignore b/.gitignore index a93bf7e..cd4fb80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ kubernetes/.packaged/ .idea/ *.swp +.version # Prevent certificates from getting checked in *.ca diff --git a/.version b/.version deleted file mode 100644 index 450a687..0000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -1.28.1 diff --git a/Makefile b/Makefile index 7007345..bacd737 100644 --- a/Makefile +++ b/Makefile @@ -31,18 +31,21 @@ BINARIES = boot-script-service bss-init GOOS := $(if $(GOOS),$(GOOS),linux) GOARCH := $(if $(GOARCH),$(GOARCH),amd64) -all: version binaries +.PHONY: all +all: binaries .PHONY: binaries -binaries: $(BINARIES) +binaries: version $(BINARIES) .PHONY: docker -container: $(BINARIES) +container: version $(BINARIES) $(DOCKER) build --tag openchami/bss:$(VERSION)-dirty $(DOCKEROPTS) . +# BSS uses the .version file when printing its version, so we need to +# update it. .PHONY: version version: - @echo '$(VERSION)' | tr -d v | tee .version + echo '$(VERSION)' | tr -d v | tee .version %: cmd/%/*.go GOOS=$(GOOS) GOARCH=$(GOARCH) go build -v -tags musl $(LDFLAGS) -o $@ ./$(dir $<) From b9e193122d64a382683d27156a304d8911ad9711 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 2 Aug 2024 13:53:53 -0600 Subject: [PATCH 12/19] .gitignore: Ignore generated binaries --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index cd4fb80..e596c16 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ kubernetes/.packaged/ *.swp .version +# Binaries +boot-script-service +bss-init + # Prevent certificates from getting checked in *.ca *.cer From 6acfa21e0e498b4fb2eccdacdf06016dda8475c6 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 2 Aug 2024 14:24:06 -0600 Subject: [PATCH 13/19] .github: Generate .version before running unit tests --- .github/workflows/unit_test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit_test.yaml b/.github/workflows/unit_test.yaml index cdac4d8..6450b2d 100644 --- a/.github/workflows/unit_test.yaml +++ b/.github/workflows/unit_test.yaml @@ -16,5 +16,7 @@ go-version: '1.21.x' - name: Install dependencies run: go get ./boot-script-service ./bss-init + - name: Generate .version + run: make version - name: Test with the Go CLI run: go test ./boot-script-service ./bss-init From d8ff4ad8028b675bd0fc724922390029a7f61962 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 2 Aug 2024 14:28:36 -0600 Subject: [PATCH 14/19] .github: Set working directory when running make for unit tests --- .github/workflows/unit_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yaml b/.github/workflows/unit_test.yaml index 6450b2d..442c682 100644 --- a/.github/workflows/unit_test.yaml +++ b/.github/workflows/unit_test.yaml @@ -17,6 +17,6 @@ - name: Install dependencies run: go get ./boot-script-service ./bss-init - name: Generate .version - run: make version + run: make -C ../ version - name: Test with the Go CLI run: go test ./boot-script-service ./bss-init From 5ad3e1a697991cdc41235b21b683ebbe295a834a Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Fri, 2 Aug 2024 14:43:05 -0600 Subject: [PATCH 15/19] Makefile: Add --always to git describe --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bacd737..3bdca5e 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ DOCKER ?= docker # Version BUILD := $(shell git rev-parse --short HEAD) -VERSION := $(shell git describe --tags --abbrev=0) +VERSION := $(shell git describe --tags --always --abbrev=0) BINARIES = boot-script-service bss-init GOOS := $(if $(GOOS),$(GOOS),linux) GOARCH := $(if $(GOARCH),$(GOARCH),amd64) From cae8b836d216e64840c0d86fc0749fd53e398f28 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Mon, 5 Aug 2024 09:20:28 -0600 Subject: [PATCH 16/19] Delete runSnyk.sh --- runSnyk.sh | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100755 runSnyk.sh diff --git a/runSnyk.sh b/runSnyk.sh deleted file mode 100755 index b3f2f27..0000000 --- a/runSnyk.sh +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/bash -# MIT License -# -# (C) Copyright [2021] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -set -ex -SNYK_OPTS="--dev --show-vulnerable-paths=all --fail-on=all --severity-threshold=${SEVERITY:-high} --skip-unresolved=true --json" - -OUT=$(set -x; snyk test --all-projects --detection-depth=999 $SNYK_OPTS) - -PROJ_CHECK=OK -jq .[].ok <<<"$OUT" | grep -q false && PROJ_CHECK=FAIL - -echo Snyk project check: $PROJ_CHECK - -DOCKER_CHECK= -if [ -f Dockerfile ]; then - DOCKER_IMAGE=${PWD/*\//}:$(cat .version) - docker build --tag $DOCKER_IMAGE . - OUT=$(set -x; snyk test --docker $DOCKER_IMAGE --file=${PWD}/Dockerfile $SNYK_OPTS) - DOCKER_CHECK=OK - jq .ok <<<"$OUT" | grep -q false && DOCKER_CHECK=FAIL -fi - -echo -echo Snyk project check: $PROJ_CHECK -echo Snyk docker check: $DOCKER_CHECK - -test "$PROJ_CHECK" == OK -a "$DOCKER_CHECK" == OK -exit $? From c90471ad363550c9fe40cc805c4defb58939cf31 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Mon, 5 Aug 2024 09:20:48 -0600 Subject: [PATCH 17/19] Delete dev/ --- dev/etcd/run.sh | 36 - dev/mimicry/config.json | 1461 --------------------------------------- dev/run.sh | 24 - 3 files changed, 1521 deletions(-) delete mode 100755 dev/etcd/run.sh delete mode 100644 dev/mimicry/config.json delete mode 100755 dev/run.sh diff --git a/dev/etcd/run.sh b/dev/etcd/run.sh deleted file mode 100755 index 34e5459..0000000 --- a/dev/etcd/run.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -NODE_IP="0.0.0.0" - -TAG="v3.4.10" - -docker run \ - -p 2379:2379 \ - -p 2380:2380 \ - quay.io/coreos/etcd:${TAG} \ - /usr/local/bin/etcd \ - --data-dir=/etcd-data --name node1 \ - --initial-advertise-peer-urls http://${NODE_IP}:2380 --listen-peer-urls http://0.0.0.0:2380 \ - --advertise-client-urls http://${NODE_IP}:2379 --listen-client-urls http://0.0.0.0:2379 \ - --initial-cluster node1=http://${NODE_IP}:2380 diff --git a/dev/mimicry/config.json b/dev/mimicry/config.json deleted file mode 100644 index b3f61b9..0000000 --- a/dev/mimicry/config.json +++ /dev/null @@ -1,1461 +0,0 @@ -{ - "routes": { - "/hsm/v2/Inventory/ComponentEndpoints?type=Node": { - "response": { - "ComponentEndpoints": [ - { - "ID": "x3000c0s19b1n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "MACAddr": "a4:bf:01:3e:fb:8a", - "UUID": "ca4ebbc1-859c-11e8-ab21-a4bf013efb8a", - "OdataID": "/redfish/v1/Systems/QSBP82801511", - "RedfishEndpointID": "x3000c0s19b1", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s19b1", - "RedfishURL": "x3000c0s19b1/redfish/v1/Systems/QSBP82801511", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "S2600BPB", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "PushPowerButton", - "On", - "GracefulShutdown", - "ForceRestart", - "Nmi", - "ForceOn", - "ForceOff" - ], - "@Redfish.ActionInfo": "", - "target": "/redfish/v1/Systems/QSBP82801511/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 1, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:fb:8a" - }, - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:fb:8b" - } - ] - } - }, - { - "ID": "x3000c0s19b2n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "MACAddr": "a4:bf:01:3e:dd:1e", - "UUID": "3d73f27c-833e-11e8-ab21-a4bf013edd1e", - "OdataID": "/redfish/v1/Systems/QSBP82704385", - "RedfishEndpointID": "x3000c0s19b2", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s19b2", - "RedfishURL": "x3000c0s19b2/redfish/v1/Systems/QSBP82704385", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "S2600BPB", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "PushPowerButton", - "On", - "GracefulShutdown", - "ForceRestart", - "Nmi", - "ForceOn", - "ForceOff" - ], - "@Redfish.ActionInfo": "", - "target": "/redfish/v1/Systems/QSBP82704385/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 1, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:dd:1e" - }, - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:dd:1f" - } - ] - } - }, - { - "ID": "x3000c0s1b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e827c", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s1b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s1b0", - "RedfishURL": "x3000c0s1b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "ForceRestart", - "ForceOff", - "GracefulShutdown", - "On" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:7c" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:7d" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s19b3n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "MACAddr": "a4:bf:01:3e:c6:65", - "UUID": "a4cd6824-8064-11e8-ab21-a4bf013ec665", - "OdataID": "/redfish/v1/Systems/QSBP82703608", - "RedfishEndpointID": "x3000c0s19b3", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s19b3", - "RedfishURL": "x3000c0s19b3/redfish/v1/Systems/QSBP82703608", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "S2600BPB", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "PushPowerButton", - "On", - "GracefulShutdown", - "ForceRestart", - "Nmi", - "ForceOn", - "ForceOff" - ], - "@Redfish.ActionInfo": "", - "target": "/redfish/v1/Systems/QSBP82703608/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 1, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:c6:65" - }, - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:c6:66" - } - ] - } - }, - { - "ID": "x3000c0s27b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e99a5234d", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s27b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s27b0", - "RedfishURL": "x3000c0s27b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "On", - "ForceRestart", - "GracefulShutdown", - "ForceOff" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:a5:23:4e" - }, - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:a5:23:4d" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s17b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e8270", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s17b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s17b0", - "RedfishURL": "x3000c0s17b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "On", - "ForceRestart", - "GracefulShutdown", - "ForceOff" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:70" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:71" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Systems/Self" - }, - { - "@odata.id": "/redfish/v1/Chassis/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s19b4n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "MACAddr": "a4:bf:01:3e:dc:88", - "UUID": "6376d0fb-830b-11e8-ab21-a4bf013edc88", - "OdataID": "/redfish/v1/Systems/QSBP82704355", - "RedfishEndpointID": "x3000c0s19b4", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s19b4", - "RedfishURL": "x3000c0s19b4/redfish/v1/Systems/QSBP82704355", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "S2600BPB", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "PushPowerButton", - "On", - "GracefulShutdown", - "ForceRestart", - "Nmi", - "ForceOn", - "ForceOff" - ], - "@Redfish.ActionInfo": "", - "target": "/redfish/v1/Systems/QSBP82704355/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 1, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:dc:88" - }, - { - "RedfishId": "", - "@odata.id": "", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:dc:89" - } - ] - } - }, - { - "ID": "x3000c0s11b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e0606", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s11b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s11b0", - "RedfishURL": "x3000c0s11b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "ForceRestart", - "GracefulShutdown", - "On", - "ForceOff" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:06:07" - }, - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:06:06" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s3b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993b70e6", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s3b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s3b0", - "RedfishURL": "x3000c0s3b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "On", - "ForceRestart", - "GracefulShutdown", - "ForceOff" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3b:70:e6" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3b:70:e7" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s15b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e05f6", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s15b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s15b0", - "RedfishURL": "x3000c0s15b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "On", - "ForceRestart", - "ForceOff", - "GracefulShutdown" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:05:f7" - }, - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:05:f6" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s9b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993b70de", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s9b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s9b0", - "RedfishURL": "x3000c0s9b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "GracefulShutdown", - "On", - "ForceOff", - "ForceRestart" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3b:70:de" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3b:70:df" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s7b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e827c", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s7b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s7b0", - "RedfishURL": "x3000c0s7b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "ForceRestart", - "ForceOff", - "GracefulShutdown", - "On" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:7c" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:7d" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s13b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e7eb4", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s13b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s13b0", - "RedfishURL": "x3000c0s13b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "GracefulShutdown", - "ForceRestart", - "On", - "ForceOff" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:7e:b4" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:7e:b5" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Chassis/Self" - }, - { - "@odata.id": "/redfish/v1/Systems/Self" - } - ] - } - ] - } - }, - { - "ID": "x3000c0s5b0n0", - "Type": "Node", - "RedfishType": "ComputerSystem", - "RedfishSubtype": "Physical", - "UUID": "70518000-5ab2-11eb-8000-b42e993e8268", - "OdataID": "/redfish/v1/Systems/Self", - "RedfishEndpointID": "x3000c0s5b0", - "Enabled": true, - "RedfishEndpointFQDN": "x3000c0s5b0", - "RedfishURL": "x3000c0s5b0/redfish/v1/Systems/Self", - "ComponentEndpointType": "ComponentEndpointComputerSystem", - "RedfishSystemInfo": { - "Name": "System", - "Actions": { - "#ComputerSystem.Reset": { - "ResetType@Redfish.AllowableValues": [ - "GracefulShutdown", - "ForceOff", - "ForceRestart", - "On" - ], - "@Redfish.ActionInfo": "/redfish/v1/Systems/Self/ResetActionInfo", - "target": "/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset" - } - }, - "EthernetNICInfo": [ - { - "RedfishId": "1", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/1", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:68" - }, - { - "RedfishId": "2", - "@odata.id": "/redfish/v1/Systems/Self/EthernetInterfaces/2", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:69" - } - ], - "PowerURL": "/redfish/v1/Chassis/Self/Power", - "PowerControl": [ - { - "@odata.id": "/redfish/v1/Chassis/Self/Power#/PowerControl/0", - "MemberId": "0", - "Name": "Chassis Power Control", - "PowerCapacityWatts": 65535, - "OEM": {}, - "RelatedItem": [ - { - "@odata.id": "/redfish/v1/Systems/Self" - }, - { - "@odata.id": "/redfish/v1/Chassis/Self" - } - ] - } - ] - } - } - ] - } - }, - "/hsm/v2/State/Components?type=Node": { - "response": { - "Components": [ - { - "ID": "x3000c0s19b1n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Compute", - "NID": 1, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s19b2n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Compute", - "NID": 2, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s1b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Master", - "NID": 100001, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s19b3n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Compute", - "NID": 3, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s27b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Application", - "SubRole": "UAN", - "NID": 49169248, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s19b4n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Compute", - "NID": 4, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s9b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Worker", - "NID": 100005, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s7b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Worker", - "NID": 100004, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s13b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Storage", - "NID": 100007, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s3b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Master", - "NID": 100002, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s17b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Storage", - "NID": 100009, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s5b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Master", - "NID": 100003, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s11b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Worker", - "NID": 100006, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - }, - { - "ID": "x3000c0s15b0n0", - "Type": "Node", - "State": "On", - "Flag": "OK", - "Enabled": true, - "Role": "Management", - "SubRole": "Storage", - "NID": 100008, - "NetType": "Sling", - "Arch": "X86", - "Class": "River" - } - ] - } - }, - "/hsm/v2/Inventory/EthernetInterfaces?type=Node": { - "response": [ - { - "ID": "98039bbba880", - "Description": "", - "MACAddress": "98:03:9b:bb:a8:80", - "IPAddresses": [ - { - "IPAddress": "10.252.0.5", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.63626Z", - "ComponentID": "x3000c0s9b0n0", - "Type": "Node" - }, - { - "ID": "98039bb42756", - "Description": "", - "MACAddress": "98:03:9b:b4:27:56", - "IPAddresses": [ - { - "IPAddress": "10.252.0.6", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.647663Z", - "ComponentID": "x3000c0s11b0n0", - "Type": "Node" - }, - { - "ID": "506b4b08d036", - "Description": "", - "MACAddress": "50:6b:4b:08:d0:36", - "IPAddresses": [ - { - "IPAddress": "10.252.0.11", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.658129Z", - "ComponentID": "x3000c0s3b0n0", - "Type": "Node" - }, - { - "ID": "b8599f1dd8e6", - "Description": "", - "MACAddress": "b8:59:9f:1d:d8:e6", - "IPAddresses": [ - { - "IPAddress": "10.252.0.12", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.671266Z", - "ComponentID": "x3000c0s5b0n0", - "Type": "Node" - }, - { - "ID": "98039bbba898", - "Description": "", - "MACAddress": "98:03:9b:bb:a8:98", - "IPAddresses": [ - { - "IPAddress": "10.252.0.7", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.695165Z", - "ComponentID": "x3000c0s13b0n0", - "Type": "Node" - }, - { - "ID": "98039bbba890", - "Description": "", - "MACAddress": "98:03:9b:bb:a8:90", - "IPAddresses": [ - { - "IPAddress": "10.252.0.8", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.708208Z", - "ComponentID": "x3000c0s15b0n0", - "Type": "Node" - }, - { - "ID": "98039bbba884", - "Description": "", - "MACAddress": "98:03:9b:bb:a8:84", - "IPAddresses": [ - { - "IPAddress": "127.0.0.1", - "Network": "" - } - ], - "LastUpdate": "2020-10-20T21:56:09.973526Z", - "ComponentID": "x3000c0s17b0n0", - "Type": "Node" - }, - { - "ID": "98039bbbaa00", - "Description": "", - "MACAddress": "98:03:9b:bb:aa:00", - "IPAddresses": [ - { - "IPAddress": "10.252.0.4", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T15:13:13.020137Z", - "ComponentID": "x3000c0s7b0n0", - "Type": "Node" - }, - { - "ID": "a4bf013efb8a", - "Description": "", - "MACAddress": "a4bf013efb8a", - "IPAddresses": [ - { - "IPAddress": "10.252.50.7", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T20:57:49.763283Z", - "ComponentID": "x3000c0s19b1n0", - "Type": "Node" - }, - { - "ID": "a4bf013efb8b", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:fb:8b", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.374344Z", - "ComponentID": "x3000c0s19b1n0", - "Type": "Node" - }, - { - "ID": "a4bf013edd1e", - "Description": "", - "MACAddress": "a4bf013edd1e", - "IPAddresses": [ - { - "IPAddress": "10.252.50.5", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T20:57:49.701702Z", - "ComponentID": "x3000c0s19b2n0", - "Type": "Node" - }, - { - "ID": "a4bf013edd1f", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:dd:1f", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.478527Z", - "ComponentID": "x3000c0s19b2n0", - "Type": "Node" - }, - { - "ID": "a4bf013ec665", - "Description": "", - "MACAddress": "a4bf013ec665", - "IPAddresses": [ - { - "IPAddress": "10.252.50.6", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T20:57:49.734261Z", - "ComponentID": "x3000c0s19b3n0", - "Type": "Node" - }, - { - "ID": "a4bf013ec666", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:c6:66", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.599882Z", - "ComponentID": "x3000c0s19b3n0", - "Type": "Node" - }, - { - "ID": "b42e993b70e6", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3b:70:e6", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:37.144176Z", - "ComponentID": "x3000c0s3b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e8268", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:68", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.947252Z", - "ComponentID": "x3000c0s5b0n0", - "Type": "Node" - }, - { - "ID": "b42e99a5234e", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:a5:23:4e", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.806159Z", - "ComponentID": "x3000c0s27b0n0", - "Type": "Node" - }, - { - "ID": "b42e99a5234d", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:a5:23:4d", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.806159Z", - "ComponentID": "x3000c0s27b0n0", - "Type": "Node" - }, - { - "ID": "a4bf013edc88", - "Description": "", - "MACAddress": "a4bf013edc88", - "IPAddresses": [ - { - "IPAddress": "10.252.50.4", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T20:57:49.612387Z", - "ComponentID": "x3000c0s19b4n0", - "Type": "Node" - }, - { - "ID": "a4bf013edc89", - "Description": "Missing interface 2, MAC computed via workaround", - "MACAddress": "a4:bf:01:3e:dc:89", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.865134Z", - "ComponentID": "x3000c0s19b4n0", - "Type": "Node" - }, - { - "ID": "b42e993e0607", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:06:07", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:37.007437Z", - "ComponentID": "x3000c0s11b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e05f7", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:05:f7", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:37.07622Z", - "ComponentID": "x3000c0s15b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e8270", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:70", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.731094Z", - "ComponentID": "x3000c0s17b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e827c", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:82:7c", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.535189Z", - "ComponentID": "x3000c0s7b0n0", - "Type": "Node" - }, - { - "ID": "b42e993b70de", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3b:70:de", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-22T13:55:53.630975Z", - "ComponentID": "x3000c0s9b0n0", - "Type": "Node" - }, - { - "ID": "b42e993b70df", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3b:70:df", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-22T13:55:53.630975Z", - "ComponentID": "x3000c0s9b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e7eb4", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:7e:b4", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.663298Z", - "ComponentID": "x3000c0s13b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e7eb5", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:7e:b5", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.663298Z", - "ComponentID": "x3000c0s13b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e827d", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:7d", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.535189Z", - "ComponentID": "x3000c0s7b0n0", - "Type": "Node" - }, - { - "ID": "b42e993b70e7", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3b:70:e7", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:37.144176Z", - "ComponentID": "x3000c0s3b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e8271", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:71", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.731094Z", - "ComponentID": "x3000c0s17b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e8269", - "Description": "Ethernet Interface Lan2", - "MACAddress": "b4:2e:99:3e:82:69", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:36.947252Z", - "ComponentID": "x3000c0s5b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e0606", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:06:06", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:37.007437Z", - "ComponentID": "x3000c0s11b0n0", - "Type": "Node" - }, - { - "ID": "b42e993e05f6", - "Description": "Ethernet Interface Lan1", - "MACAddress": "b4:2e:99:3e:05:f6", - "IPAddresses": [ - { - "IPAddress": "", - "Network": "" - } - ], - "LastUpdate": "2020-10-21T23:30:37.07622Z", - "ComponentID": "x3000c0s15b0n0", - "Type": "Node" - } - ] - } - }, - "default": { - "data": "hello world..." - } -} \ No newline at end of file diff --git a/dev/run.sh b/dev/run.sh deleted file mode 100755 index 6bbaacf..0000000 --- a/dev/run.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -go run github.com/Cray-HPE/hms-bss/cmd/boot-script-service --cloud-init-address 0.0.0.0:27778 --datastore http://0.0.0.0:2379 --hsm http://0.0.0.0:8000 From f31586202f15dbf234d20f97347e5f8e38a235d6 Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Mon, 5 Aug 2024 09:21:09 -0600 Subject: [PATCH 18/19] Delete scripts/doVersionRelease.sh --- scripts/doVersionRelease.sh | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 scripts/doVersionRelease.sh diff --git a/scripts/doVersionRelease.sh b/scripts/doVersionRelease.sh deleted file mode 100755 index 99c23e6..0000000 --- a/scripts/doVersionRelease.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# MIT License -# -# (C) Copyright [2022] Hewlett Packard Enterprise Development LP -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# When it's time to update the version information, use this script as a person - -echo "Detecting the version from the changelog..." -VERSION=$(grep -m1 \#\# ../CHANGELOG.md | sed -e "s/\].*$//" |sed -e "s/^.*\[//") -echo "Version = $VERSION" - -echo "Add the version to the VERSION file" -echo ${VERSION} > ../.version - -# tag it -git commit -am "Version $VERSION" -git tag -a "v$VERSION" -m "Version $VERSION" -git push -git push --tags From ad2f5f5cc127f87241c407dbf4f6cac6528402ed Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Mon, 5 Aug 2024 10:47:25 -0600 Subject: [PATCH 19/19] Update CHANGELOG.md for v1.31.1 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb5cea..bda5882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.31.1] - 2024-08-05 + +- Removed unused files and directories from repository +- Removed reliance on .version file for tagging containers + - While not tracked in repository, it is still generated so BSS can fetch its version + when the version endpoint is queried +- Updated Makefile + - `git describe` is now used to get version instead of .version file + - Replaced `docker` target with `container` and allowed using different container runtime + - Added version target to generate .version; used in CI and dependency for all build targets + - Got rid of unnecessary targets/recipes + ## [1.31.0] - 2024-07-25 - Added CheckMacs() to BootParams struct to check MAC address format on POST/PUT/PATCH