diff --git a/0001-update.patch b/0001-update.patch deleted file mode 100644 index ab4f162..0000000 --- a/0001-update.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 098c4fd336651504ae6a50a2d3a330bfa3a741d6 Mon Sep 17 00:00:00 2001 -From: Andreas Harter -Date: Mon, 3 Apr 2023 22:28:57 +0200 -Subject: [PATCH] update - ---- - .github/workflows/main.yml | 2 +- - .github/workflows/release.yml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml -index 2f1ce85..ea2ee49 100644 ---- a/.github/workflows/main.yml -+++ b/.github/workflows/main.yml -@@ -31,7 +31,7 @@ env: - GOVERSION: 1.19.x - NODEVERSION: 16.x - PYTHONVERSION: "3.9" -- DOTNETVERSION: 3.1.301 -+ DOTNETVERSION: 6.0.15 - JAVAVERSION: "11" - jobs: - prerequisites: -diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml -index fcb858f..cdc0dd7 100644 ---- a/.github/workflows/release.yml -+++ b/.github/workflows/release.yml -@@ -21,7 +21,7 @@ env: - GOVERSION: 1.19.x - NODEVERSION: 16.x - PYTHONVERSION: "3.9" -- DOTNETVERSION: 3.1.301 -+ DOTNETVERSION: 6.0.15 - JAVAVERSION: "11" - jobs: - prerequisites: --- -2.40.0 - diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 7b3626b..0000000 --- a/Pipfile +++ /dev/null @@ -1,12 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] - -[dev-packages] - -[requires] -python_version = "3.10" -python_full_version = "3.10.13" diff --git a/cov/byExample.json b/cov/byExample.json deleted file mode 100644 index 59babb3..0000000 --- a/cov/byExample.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "ExampleName": "#/resources/unifi:firewall/group:Group", - "OriginalHCL": "variable \"laptop_ips\" {\n type = list(string)\n}\n\nresource \"unifi_firewall_group\" \"can_print\" {\n name = \"can-print\"\n type = \"address-group\"\n\n members = var.laptop_ips\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:iam/user:User", - "OriginalHCL": "resource \"unifi_user\" \"test\" {\n mac = \"01:23:45:67:89:AB\"\n name = \"some client\"\n note = \"my note\"\n\n fixed_ip = \"10.0.0.50\"\n network_id = unifi_network.my_vlan.id\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:index/staticRoute:StaticRoute", - "OriginalHCL": "resource \"unifi_static_route\" \"nexthop\" {\n type = \"nexthop-route\"\n network = \"172.17.0.0/16\"\n name = \"basic nexthop\"\n distance = 1\n next_hop = \"172.16.0.1\"\n}\n\nresource \"unifi_static_route\" \"blackhole\" {\n type = \"blackhole\"\n network = var.blackhole_cidr\n name = \"blackhole traffice to cidr\"\n distance = 1\n}\n\nresource \"unifi_static_route\" \"interface\" {\n type = \"interface-route\"\n network = var.wan2_cidr\n name = \"send traffic over wan2\"\n distance = 1\n interface = \"WAN2\"\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/functions/unifi:iam/getUser:getUser", - "OriginalHCL": "data \"unifi_user\" \"client\" {\n mac = \"01:23:45:67:89:ab\"\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:setting/mgmt:Mgmt", - "OriginalHCL": "resource \"unifi_site\" \"example\" {\n description = \"example\"\n}\n\nresource \"unifi_setting_mgmt\" \"example\" {\n site = unifi_site.example.name\n auto_upgrade = true\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:index/device:Device", - "OriginalHCL": "data \"unifi_port_profile\" \"disabled\" {\n # look up the built-in disabled port profile\n name = \"Disabled\"\n}\n\nresource \"unifi_port_profile\" \"poe\" {\n name = \"poe\"\n forward = \"customize\"\n\n native_networkconf_id = var.native_network_id\n tagged_networkconf_ids = [\n var.some_vlan_network_id,\n ]\n\n poe_mode = \"auto\"\n}\n\nresource \"unifi_device\" \"us_24_poe\" {\n # optionally specify MAC address to skip manually importing\n # manual import is the safest way to add a device\n mac = \"01:23:45:67:89:AB\"\n\n name = \"Switch with POE\"\n\n port_override {\n number = 1\n name = \"port w/ poe\"\n port_profile_id = unifi_port_profile.poe.id\n }\n\n port_override {\n number = 2\n name = \"disabled\"\n port_profile_id = data.unifi_port_profile.disabled.id\n }\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:index/network:Network", - "OriginalHCL": "variable \"vlan_id\" {\n default = 10\n}\n\nresource \"unifi_network\" \"vlan\" {\n name = \"wifi-vlan\"\n purpose = \"corporate\"\n\n subnet = \"10.0.0.1/24\"\n vlan_id = var.vlan_id\n dhcp_start = \"10.0.0.6\"\n dhcp_stop = \"10.0.0.254\"\n dhcp_enabled = true\n}\n\nresource \"unifi_network\" \"wan\" {\n name = \"wan\"\n purpose = \"wan\"\n\n wan_networkgroup = \"WAN\"\n wan_type = \"pppoe\"\n wan_ip = \"192.168.1.1\"\n wan_egress_qos = 1\n wan_username = \"username\"\n x_wan_password = \"password\"\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:iam/group:Group", - "OriginalHCL": "resource \"unifi_user_group\" \"wifi\" {\n name = \"wifi\"\n\n qos_rate_max_down = 2000 # 2mbps\n qos_rate_max_up = 10 # 10kbps\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/functions/unifi:index/getApGroup:getApGroup", - "OriginalHCL": "data \"unifi_ap_group\" \"default\" {\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:port/profile:Profile", - "OriginalHCL": "variable \"vlan_id\" {\n default = 10\n}\n\nresource \"unifi_network\" \"vlan\" {\n name = \"wifi-vlan\"\n purpose = \"corporate\"\n\n subnet = \"10.0.0.1/24\"\n vlan_id = var.vlan_id\n dhcp_start = \"10.0.0.6\"\n dhcp_stop = \"10.0.0.254\"\n dhcp_enabled = true\n}\n\nresource \"unifi_port_profile\" \"poe_disabled\" {\n name = \"POE Disabled\"\n\n native_networkconf_id = unifi_network.vlan.id\n poe_mode = \"off\"\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:index/site:Site", - "OriginalHCL": "resource \"unifi_site\" \"mysite\" {\n description = \"mysite\"\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/functions/unifi:port/getProfile:getProfile", - "OriginalHCL": "data \"unifi_port_profile\" \"all\" {\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:index/dynamicDNS:DynamicDNS", - "OriginalHCL": "resource \"unifi_dynamic_dns\" \"test\" {\n service = \"dyndns\"\n\n host_name = \"my-network.example.com\"\n\n server = \"domains.google.com\"\n login = var.dns_login\n password = var.dns_password\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:firewall/rule:Rule", - "OriginalHCL": "variable \"ip_address\" {\n type = string\n}\n\nresource \"unifi_firewall_rule\" \"drop_all\" {\n name = \"drop all\"\n action = \"drop\"\n ruleset = \"LAN_IN\"\n\n rule_index = 2011\n\n protocol = \"all\"\n\n dst_address = var.ip_address\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/resources/unifi:index/wlan:Wlan", - "OriginalHCL": "variable \"vlan_id\" {\n default = 10\n}\n\ndata \"unifi_ap_group\" \"default\" {\n}\n\ndata \"unifi_user_group\" \"default\" {\n}\n\nresource \"unifi_network\" \"vlan\" {\n name = \"wifi-vlan\"\n purpose = \"corporate\"\n\n subnet = \"10.0.0.1/24\"\n vlan_id = var.vlan_id\n dhcp_start = \"10.0.0.6\"\n dhcp_stop = \"10.0.0.254\"\n dhcp_enabled = true\n}\n\nresource \"unifi_wlan\" \"wifi\" {\n name = \"myssid\"\n passphrase = \"12345678\"\n security = \"wpapsk\"\n\n # enable WPA2/WPA3 support\n wpa3_support = true\n wpa3_transition = true\n pmf_mode = \"optional\"\n\n network_id = unifi_network.vlan.id\n ap_group_ids = [data.unifi_ap_group.default.id]\n user_group_id = data.unifi_user_group.default.id\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} -{ - "ExampleName": "#/functions/unifi:index/getNetwork:getNetwork", - "OriginalHCL": "#retrieve network data by unifi network name\ndata \"unifi_network\" \"lan_network\" {\n name = \"LAN\"\n}\n\n#retrieve network data from user record\ndata \"unifi_user\" \"my_device\" {\n mac = \"01:23:45:67:89:ab\"\n}\ndata \"unifi_network\" \"my_network\" {\n id = data.unifi_user.my_device.network_id\n}", - "ConversionResults": { - "typescript": { - "FailureSeverity": 0, - "FailureInfo": "", - "TranslationCount": 1 - } - } -} diff --git a/cov/byLanguage.json b/cov/byLanguage.json deleted file mode 100644 index 43022e1..0000000 --- a/cov/byLanguage.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "typescript": { - "Total": 16, - "Successes": { - "Number": 16, - "Pct": 100 - }, - "Warnings": { - "Number": 0, - "Pct": 0 - }, - "Failures": { - "Number": 0, - "Pct": 0 - }, - "Fatals": { - "Number": 0, - "Pct": 0 - }, - "FrequentErrors": [] - } -} \ No newline at end of file diff --git a/cov/shortSummary.txt b/cov/shortSummary.txt deleted file mode 100644 index 90c326c..0000000 --- a/cov/shortSummary.txt +++ /dev/null @@ -1,4 +0,0 @@ -Provider: unifi -Success rate: 100.00% (16/16) - -Converted 100.00% of typescript examples (16/16) diff --git a/cov/summary.json b/cov/summary.json deleted file mode 100644 index 7e71641..0000000 --- a/cov/summary.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Name": "unifi", - "Version": "", - "Examples": 16, - "TotalConversions": 16, - "Successes": { - "Number": 16, - "Pct": 100 - }, - "Warnings": { - "Number": 0, - "Pct": 0 - }, - "Failures": { - "Number": 0, - "Pct": 0 - }, - "Fatals": { - "Number": 0, - "Pct": 0 - }, - "ConversionErrors": [] -} \ No newline at end of file diff --git a/update-all.sh b/update-all.sh deleted file mode 100644 index 94ad3c1..0000000 --- a/update-all.sh +++ /dev/null @@ -1,5 +0,0 @@ -go get -u -go mod tidy - -# and to recursively update packages in any subdirectories: -go get -u ./... diff --git a/upgrade-sdk-provider.sh b/upgrade-sdk-provider.sh deleted file mode 100644 index 3bbb64c..0000000 --- a/upgrade-sdk-provider.sh +++ /dev/null @@ -1,2 +0,0 @@ -make provider -make build_sdks