Skip to content

Add preset datatype in slcli virtual detail #1435

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

Merged
merged 3 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions SoftLayer/CLI/virt/detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ def cli(env, identifier, passwords=False, price=False):
table.add_row(['transient', result.get('transientGuestFlag', False)])
table.add_row(['created', result['createDate']])
table.add_row(['modified', result['modifyDate']])
table.add_row(['preset', utils.lookup(result, 'billingItem',
'orderItem',
'preset',
'keyName') or {}])

table.add_row(_get_owner_row(result))
table.add_row(_get_vlan_table(result))
Expand Down
37 changes: 19 additions & 18 deletions SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
'userRecord': {
'username': 'chechu',
}
}
},
'preset': {'keyName': 'B1_8X16X100'}
}
},
'datacenter': {'id': 50, 'name': 'TEST00',
Expand Down Expand Up @@ -480,30 +481,30 @@
"categoryCode": "guest_disk0",
"id": 81
}}, {
"description": "250 GB (SAN)",
"attributes": [
{
"id": 198,
"attributeTypeKeyName": "SAN_DISK"
}],
"itemCategory": {
"categoryCode": "guest_disk0",
"id": 89
}}],
"description": "250 GB (SAN)",
"attributes": [
{
"id": 198,
"attributeTypeKeyName": "SAN_DISK"
}],
"itemCategory": {
"categoryCode": "guest_disk0",
"id": 89
}}],
'guest_core': [{
"description": "4 x 2.0 GHz or higher Cores (Dedicated)",
"attributes": [],
"itemCategory": {
"categoryCode": "guest_core",
"id": 80
}},
{
"description": "8 x 2.0 GHz or higher Cores",
"attributes": [],
"itemCategory": {
"categoryCode": "guest_core",
"id": 90
}}]
{
"description": "8 x 2.0 GHz or higher Cores",
"attributes": [],
"itemCategory": {
"categoryCode": "guest_core",
"id": 90
}}]
}

getReverseDomainRecords = [{
Expand Down