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

Suggestion: Organize JSON field name #180

Closed
jihoon-seo opened this issue Jun 26, 2020 · 1 comment · Fixed by #188
Closed

Suggestion: Organize JSON field name #180

jihoon-seo opened this issue Jun 26, 2020 · 1 comment · Fixed by #188
Assignees
Labels
feature request Issue related with new feature

Comments

@jihoon-seo
Copy link
Member

@seokho-son

Current valid JSON body of "Create MCIS" request: (from test/official/6.mcis/create-mcis.sh)

...
"vm": [ {
                        "name": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'-01",
                        "config_name": "'${CONN_CONFIG[$INDEX,$REGION]}'",
                        "image_id": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                        "ssh_key_id": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                        "spec_id": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                        "security_group_ids": [
                                "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'"
                        ],
                        "vnet_id": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                        "subnet_id": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                        "description": "description",
                        "vm_access_id": "cb-user",
                        "vm_access_passwd": ""
                },
...

Suggestion: (Other field name candidates are also welcome.)

As-is To-be
name -
config_name connectionName
image_id tbImageId or imageId
ssh_key_id tbSshKeyId or sshKeyId
spec_id tbSpecId or specId
security_group_ids tbSecurityGroupIds or securityGroupIds
vnet_id tbVNetId or vNetId
subnet_id tbSubnetId or subnetId
description -
vm_access_id vmUserAccount
vm_access_passwd vmUserPassword

FYI: CB-Spider, and CB-Tumblebug MCIR REST API uses camelCase for JSON field names.

  • cb-tumblebug/test/official/1.vNet/create-vNet.sh
{
                "name": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                "connectionName": "'${CONN_CONFIG[$INDEX,$REGION]}'",
                "cidrBlock": "192.168.0.0/16",
                "subnetInfoList": [ {
                        "Name": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                        "IPv4_CIDR": "192.168.1.0/24"
                } ]
        }
  • cb-tumblebug/test/official/2.securityGroup/create-securityGroup.sh
{
                "name": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                "connectionName": "'${CONN_CONFIG[$INDEX,$REGION]}'",
                "vNetId": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",
                "description": "test description",
                    "firewallRules": [
                            {
                                    "FromPort": "1",
                                    "ToPort": "65535",
                                    "IPProtocol": "tcp",
                                    "Direction": "inbound"
                            },
                                {
                                    "FromPort": "-1",
                                    "ToPort": "-1",
                                    "IPProtocol": "icmp",
                                    "Direction": "inbound"
                            }
                    ]
            }
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.60. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue related with new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant