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

Main into dev #2237

Merged
merged 15 commits into from
Feb 29, 2024
Merged

Main into dev #2237

merged 15 commits into from
Feb 29, 2024

Conversation

laduke
Copy link
Contributor

@laduke laduke commented Feb 29, 2024

Standardizing on dev as the active branch again.

adamierymenko and others added 15 commits September 14, 2023 15:12
Because the GET request to get a specific member just dumps
the whole member object, `name` is included there too for free.
The current api at /controller/network/1111111111767f2f/member
Lists only the members' ID and revision number.
If you want details, you have to query each specific member.
So if you want to make a members list, and you have
10000 members on a network, you need to make
10000 http requests.

It's also in a hard to specify and use shape
{ [member-id-1]: 13, [member-id-2]: 14, ... }

GET http://localhost:9993/unstable/controller/network/1111111111767f2f/member ->

```
{
  data: [ {...member1}, {...member2}, ...],
  meta: { totalCount: 4, authorizedCount: 3 }
}

```
Add /unstable/controller/network endpoint

Similar to /unstable/controller/network/{id}/member, it returns actual network objects,
instead of just network ids.
Also includes the total network count,
and each network has it's member counts in meta{}.
It was checking for "offline" every loop.
But the port rebinding happens only ever X
loops. So the port would keep changing before it
would get bound.
Update client JSON API endpoint address in README.md
There was as Windows directory traversal bug in the static
file server feature. We don't use that feature, so we are ok.

We are going to use that feature soon, so we are
taking the opportunity to update.
```sh
curl -s -X POST "http://localhost:9993/controller/network/abcdabcdabcdabcd/member/1122334455"
```

Would return 200 and ZT_HOME/controller.d/abcdabcdabcdabcd/members/1122334455
would be created. Without a ZT_HOME/controller.d/abcdabcdabcdabcd.json

Then other parts of the system mistakenly think a abcdabcdabcdabcd
network sorta kinda exists and then fail in weird ways.
That trailing slash was making it not work.

ZT_HOME/controller.d/network/$nwid
@laduke laduke marked this pull request as ready for review February 29, 2024 18:36
@laduke laduke merged commit 99ef1e2 into dev Feb 29, 2024
4 of 5 checks passed
@laduke laduke deleted the main-into-dev branch February 29, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants