1
mirror of https://github.com/home-assistant/core synced 2024-09-15 17:29:45 +02:00
ha-core/tests/fixtures/vultr_server_list.json
Adam Cooper 72ce9ec321 Add platform and sensors for Vultr VPS (#9928)
* Initial commit of Vultr components

Have a working Vultr hub and binary sensor which pulls down the
following attributes of your VPS:
 - Date created
 - Subscription id (server id)
 - Cost per month (in US$)
 - Operating System installed
 - IPv4 address
 - label (human readable name)
 - region
 - number of vcpus
 - which storage package chosen
 - IPV6 address (if applicable)
 - RAM amount

Working next on sensor and then testing / coverage.

* Added Vultr sensor for pending charges and current bandwidth. Refactored binary_sensor and hub too

* Corrected is_on bases

* Added basic tests for Vultr binary & platform

* Updated require files

* Changing test fixture to highlight different cases

* Written basic test for sensor.vultr

* Resolved linting errors and broken test

* Increase test coverage and corrected docs

* Resolved hound issues

* Revert back negative binary test

* Another hound resolve

* Refactoring and adding is switch, moving over to vultr branch

* Made Vultr components more resiliant to invalid configs

* Added negetive test for vultr binary sensor

* Added better testing of vultr sensor

* Resolved vultr platform test affecting subsequent vultr tests

* Moving VULTR components to single use design

* Added in sensor name config

* Added missing sensors var

* Resolved init data setting of sensors, added in name conf to switch

* Made the Vultr component more resiliant to startup failure with better alerting

* Various Vultr component changes

- Refactored sensor, binary_sensor, and switch to reference one subscription
- Renamed CURRENT_BANDWIDTH_GB monitored condition to CURRENT_BANDWIDTH_USED
- Improved test coverage

* Resolved local tox linting issue

* Added more testing for Vultr switch

* Improved test coverage for Vultr components

* Made PR comment changes to vultr binary sensor

* Made PR comment changes to Vultr sensor

* resolved PR comments for Vultr Switch

* Resolved vultr sensor name and improved tests

* Improved Vultr switch testing (default name formatting)

* Removed vultr hub failure checking
2017-11-05 14:10:14 +01:00

123 lines
3.8 KiB
JSON

{
"576965": {
"SUBID": "576965",
"os": "CentOS 6 x64",
"ram": "4096 MB",
"disk": "Virtual 60 GB",
"main_ip": "123.123.123.123",
"vcpu_count": "2",
"location": "New Jersey",
"DCID": "1",
"default_password": "nreqnusibni",
"date_created": "2013-12-19 14:45:41",
"pending_charges": "46.67",
"status": "active",
"cost_per_month": "10.05",
"current_bandwidth_gb": 131.512,
"allowed_bandwidth_gb": "1000",
"netmask_v4": "255.255.255.248",
"gateway_v4": "123.123.123.1",
"power_status": "running",
"server_state": "ok",
"VPSPLANID": "28",
"v6_network": "2001:DB8:1000::",
"v6_main_ip": "2001:DB8:1000::100",
"v6_network_size": "64",
"v6_networks": [
{
"v6_network": "2001:DB8:1000::",
"v6_main_ip": "2001:DB8:1000::100",
"v6_network_size": "64"
}
],
"label": "my new server",
"internal_ip": "10.99.0.10",
"kvm_url": "https://my.vultr.com/subs/novnc/api.php?data=eawxFVZw2mXnhGUV",
"auto_backups": "yes",
"tag": "mytag",
"OSID": "127",
"APPID": "0",
"FIREWALLGROUPID": "0"
},
"123456": {
"SUBID": "123456",
"os": "CentOS 6 x64",
"ram": "4096 MB",
"disk": "Virtual 60 GB",
"main_ip": "192.168.100.50",
"vcpu_count": "2",
"location": "New Jersey",
"DCID": "1",
"default_password": "nreqnusibni",
"date_created": "2014-10-13 14:45:41",
"pending_charges": "not a number",
"status": "active",
"cost_per_month": "73.25",
"current_bandwidth_gb": 957.457,
"allowed_bandwidth_gb": "1000",
"netmask_v4": "255.255.255.248",
"gateway_v4": "123.123.123.1",
"power_status": "halted",
"server_state": "ok",
"VPSPLANID": "28",
"v6_network": "2001:DB8:1000::",
"v6_main_ip": "2001:DB8:1000::100",
"v6_network_size": "64",
"v6_networks": [
{
"v6_network": "2001:DB8:1000::",
"v6_main_ip": "2001:DB8:1000::100",
"v6_network_size": "64"
}
],
"label": "my failed server",
"internal_ip": "10.99.0.10",
"kvm_url": "https://my.vultr.com/subs/novnc/api.php?data=eawxFVZw2mXnhGUV",
"auto_backups": "no",
"tag": "mytag",
"OSID": "127",
"APPID": "0",
"FIREWALLGROUPID": "0"
},
"555555": {
"SUBID": "555555",
"os": "CentOS 7 x64",
"ram": "1024 MB",
"disk": "Virtual 30 GB",
"main_ip": "192.168.250.50",
"vcpu_count": "1",
"location": "London",
"DCID": "7",
"default_password": "password",
"date_created": "2014-10-15 14:45:41",
"pending_charges": "5.45",
"status": "active",
"cost_per_month": "73.25",
"current_bandwidth_gb": 57.457,
"allowed_bandwidth_gb": "100",
"netmask_v4": "255.255.255.248",
"gateway_v4": "123.123.123.1",
"power_status": "halted",
"server_state": "ok",
"VPSPLANID": "28",
"v6_network": "2001:DB8:1000::",
"v6_main_ip": "2001:DB8:1000::100",
"v6_network_size": "64",
"v6_networks": [
{
"v6_network": "2001:DB8:1000::",
"v6_main_ip": "2001:DB8:1000::100",
"v6_network_size": "64"
}
],
"label": "Another Server",
"internal_ip": "10.99.0.10",
"kvm_url": "https://my.vultr.com/subs/novnc/api.php?data=eawxFVZw2mXnhGUV",
"auto_backups": "no",
"tag": "mytag",
"OSID": "127",
"APPID": "0",
"FIREWALLGROUPID": "0"
}
}