Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display output of MCIS status script in a table #738

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

seokho-son
Copy link
Member

JSON array output is hard to understand at a glance.

So, convert output of MCIS status to a table.

Table: All VMs in the MCIS : cb-shson01

ID                       Status   PublicIP  PrivateIP  CloudType  CloudRegion  CreatedTime
--                       ------   --------  ---------  ---------  -----------  -----------
testcloud03-frankfurt-1  Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:53
testcloud02-canada-0     Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:47
testcloud03-frankfurt-0  Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:53
testcloud01-seoul-1      Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:37
testcloud02-canada-1     Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:47
testcloud01-seoul-0      Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:36

Command

cb-tumblebug/src/testclient/scripts/sequentialFullTest$ ../8.mcis/status-mcis.sh -n shson01 -x 2

Output

####################################################################
## 8. VM: Status MCIS
####################################################################

Input parameters
// POSTFIX:shson01 // TestSetFile:../testSet.env // CSP:all // REGION:1 // OPTION01:2 // OPTION02: // OPTION03:
cb-shson01
{
  "status": {
    "id": "cb-shson01",
    "name": "cb-shson01",
    "status": "Running-6(6/6)",
    "statusCount": {
      "countTotal": 6,
      "countCreating": 0,
      "countRunning": 6,
      "countFailed": 0,
      "countSuspended": 0,
      "countRebooting": 0,
      "countTerminated": 0,
      "countSuspending": 0,
      "countResuming": 0,
      "countTerminating": 0,
      "countUndefined": 0
    },
    "targetStatus": "None",
    "targetAction": "None",
    "installMonAgent": "no",
    "masterVmId": "testcloud01-seoul-0",
    "masterIp": "4.3.2.1",
    "masterSSHPort": "22",
    "vm": [
      {
        "id": "testcloud03-frankfurt-0",
        "name": "testcloud03-frankfurt-0",
        "cspVmId": "tb01-cb-shson01-testcloud03-frankfurt-0",
        "status": "Running",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "Running",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-09-14 22:43:53",
        "publicIp": "4.3.2.1",
        "privateIp": "1.2.3.4",
        "sshPort": "22",
        "location": {
          "latitude": "37.0000",
          "longitude": "126.0000",
          "briefAddr": "South Korea (Seoul)",
          "cloudType": "mock",
          "nativeRegion": "default"
        }
      },
      {
        "id": "testcloud03-frankfurt-1",
        "name": "testcloud03-frankfurt-1",
        "cspVmId": "tb01-cb-shson01-testcloud03-frankfurt-1",
        "status": "Running",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "Running",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-09-14 22:43:53",
        "publicIp": "4.3.2.1",
        "privateIp": "1.2.3.4",
        "sshPort": "22",
        "location": {
          "latitude": "37.0000",
          "longitude": "126.0000",
          "briefAddr": "South Korea (Seoul)",
          "cloudType": "mock",
          "nativeRegion": "default"
        }
      },
      {
        "id": "testcloud01-seoul-1",
        "name": "testcloud01-seoul-1",
        "cspVmId": "tb01-cb-shson01-testcloud01-seoul-1",
        "status": "Running",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "Running",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-09-14 22:43:37",
        "publicIp": "4.3.2.1",
        "privateIp": "1.2.3.4",
        "sshPort": "22",
        "location": {
          "latitude": "37.0000",
          "longitude": "126.0000",
          "briefAddr": "South Korea (Seoul)",
          "cloudType": "mock",
          "nativeRegion": "default"
        }
      },
...
      {
        "id": "testcloud01-seoul-0",
        "name": "testcloud01-seoul-0",
        "cspVmId": "tb01-cb-shson01-testcloud01-seoul-0",
        "status": "Running",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "Running",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-09-14 22:43:36",
        "publicIp": "4.3.2.1",
        "privateIp": "1.2.3.4",
        "sshPort": "22",
        "location": {
          "latitude": "37.0000",
          "longitude": "126.0000",
          "briefAddr": "South Korea (Seoul)",
          "cloudType": "mock",
          "nativeRegion": "default"
        }
      },
      {
        "id": "testcloud02-canada-1",
        "name": "testcloud02-canada-1",
        "cspVmId": "tb01-cb-shson01-testcloud02-canada-1",
        "status": "Running",
        "targetStatus": "None",
...
          "briefAddr": "South Korea (Seoul)",
          "cloudType": "mock",
          "nativeRegion": "default"
        }
      }
    ]
  }
}
Table: All VMs in the MCIS : cb-shson01

ID                       Status   PublicIP  PrivateIP  CloudType  CloudRegion  CreatedTime
--                       ------   --------  ---------  ---------  -----------  -----------
testcloud03-frankfurt-1  Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:53
testcloud02-canada-0     Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:47
testcloud03-frankfurt-0  Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:53
testcloud01-seoul-1      Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:37
testcloud02-canada-1     Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:47
testcloud01-seoul-0      Running  4.3.2.1   1.2.3.4    mock       default      2021-09-14   22:43:36

@seokho-son
Copy link
Member Author

@hermitkim1
Minor enhancement that may affect to output of examples in some documents.

@jihoon-seo
Copy link
Member

보기 정말 편해졌네요 ㅎㅎ 좋으네요 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants