Skip to content

Commit

Permalink
update omada.yml: fix version selection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Soubinan committed Jan 11, 2025
1 parent 79a071e commit 56829e3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
23 changes: 23 additions & 0 deletions assets/omada-post-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"pageIndex": 0,
"pageSize": 1,
"sortField": "",
"sortOrder": "DESC",
"keyword": ".deb",
"siteId": 1,
"siteCode": "en",
"resourceType": "download",
"typeIdList": [],
"documentResourceTypeIdList": [],
"downloadsResourceTypeIdList": [],
"bulletinsResourceTypeIdList": [],
"documentTagIdList": [],
"downloadTagIdList": [],
"bulletinsTagIdList": [],
"communityCategories": [],
"communityTagNames": [],
"suitableModelList": [
"Omada Software Controller",
"Omada Software Controller V5"
]
}
30 changes: 3 additions & 27 deletions templates/omada.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
metadata:
name: Omada
get_version_command: curl -fsSL "https://www.tp-link.com/en/support/download/omada-software-controller/"|grep -io "https.*Omada_SDN_Controller.*linux_x64.deb"|head -n1|grep -oE "v[0-9]+.[0-9]+.[0-9]+"
get_version_command: "curl -fsSLX POST --url 'https://support.omadanetworks.com/api/v1/search/tourist/searchResource' -H 'accept: application/json' -H 'content-type: application/json' -d @assets/omada-post-data.json |jq -r '.result.download.content[].url'|grep -oE 'v[0-9]+(.[0-9]+)*'"
description: TP-Link Omada SDN Controller Solution offers centralized and efficient management for gateways, switches, and wAP.
categories: SDN, Networks
project_source: https://www.tp-link.com/en/support/download/omada-software-controller
Expand All @@ -11,32 +11,8 @@ metadata:
instructions:
files:
- path: /tmp/data.json
generator: dump
mode: "0777"
content: |-
{
"pageIndex": 0,
"pageSize": 1,
"sortField": "",
"sortOrder": "DESC",
"keyword": ".deb",
"siteId": 1,
"siteCode": "en",
"resourceType": "download",
"typeIdList": [],
"documentResourceTypeIdList": [],
"downloadsResourceTypeIdList": [],
"bulletinsResourceTypeIdList": [],
"documentTagIdList": [],
"downloadTagIdList": [],
"bulletinsTagIdList": [],
"communityCategories": [],
"communityTagNames": [],
"suitableModelList": [
"Omada Software Controller",
"Omada Software Controller V5"
]
}
generator: copy
source: assets/omada-post-data.json

packages:
- jsvc
Expand Down

0 comments on commit 56829e3

Please sign in to comment.