-
Notifications
You must be signed in to change notification settings - Fork 6
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
api work #403
api work #403
Commits on Sep 11, 2023
-
* GET /instance/monitor * GET /instance/config Use x-go-type openapi syntax to avoid a lot of transtyping code.
Configuration menu - View commit details
-
Copy full SHA for 4827319 - Browse repository at this point
Copy the full SHA 4827319View commit details -
* Rename api.GetInstance*Element to api.Instance*Item * Use api.InstanceStatusItem in the PostInstanceStatus handler, so the POST and GET /instance/status use the same body format * Make PostInstanceStatus verify the emitter node is the localhost
Configuration menu - View commit details
-
Copy full SHA for 30590d7 - Browse repository at this point
Copy the full SHA 30590d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a67daf1 - Browse repository at this point
Copy the full SHA a67daf1View commit details -
Add the GET /instance api handler
Example: $ curl -X GET 'https://localhost:1215/instance?path=foo001' -H 'accept: application/json' -H 'Authorization: Basic ..' -k -s |jq [ { "data": { "config": { "app": "default", "csum": "80e572a36f85f34823211913bce56059", "children": [ "foo010", "foo011", "foo012", "foo013", "foo014@dev2n1", "notexist" ], "orchestrate": "ha", "placement_policy": "last start", "priority": 50, "resources": { "fs#1": { "is_disabled": false, "is_monitored": false, "is_standby": false, "restart": 0, "restart_delay": 500000000 }, "volume#1": { "is_disabled": false, "is_monitored": false, "is_standby": false, "restart": 0, "restart_delay": 500000000 }, "volume#2": { "is_disabled": false, "is_monitored": false, "is_standby": false, "restart": 0, "restart_delay": 500000000 }, "volume#3": { "is_disabled": false, "is_monitored": false, "is_standby": false, "restart": 0, "restart_delay": 500000000 } }, "scope": [ "dev2n1", "dev2n2", "dev2n3" ], "subsets": {}, "topology": "failover", "updated_at": "2023-08-23T08:20:50.605710559+02:00" }, "monitor": { "global_expect": "none", "global_expect_updated_at": "0001-01-01T00:00:00Z", "global_expect_options": null, "is_leader": false, "is_ha_leader": false, "local_expect": "started", "local_expect_updated_at": "2023-09-02T10:55:54.246600548+02:00", "orchestration_id": "00000000-0000-0000-0000-000000000000", "orchestration_is_done": false, "session_id": "00000000-0000-0000-0000-000000000000", "state": "idle", "state_updated_at": "2023-09-02T10:55:51.397889345+02:00", "monitor_action_executed_at": "0001-01-01T00:00:00Z", "preserved": false, "resources": { "fs#1": { "restart": { "remaining": 0, "last_at": "0001-01-01T00:00:00Z" } }, "volume#1": { "restart": { "remaining": 0, "last_at": "0001-01-01T00:00:00Z" } }, "volume#2": { "restart": { "remaining": 0, "last_at": "0001-01-01T00:00:00Z" } }, "volume#3": { "restart": { "remaining": 0, "last_at": "0001-01-01T00:00:00Z" } } }, "updated_at": "2023-09-02T10:55:54.246628287+02:00", "children": { "foo010": "up", "foo011": "up", "foo012": "undef", "foo013": "up", "foo014@dev2n1": "up", "notexist": "undef" } }, "status": { "avail": "up", "frozen_at": "0001-01-01T00:00:00Z", "last_started_at": "2023-08-25T19:35:47.633870082+02:00", "overall": "up", "provisioned": "true", "resources": [ { "rid": "volume#1", "label": "foo001-vol-1", "status": "up", "type": "volume", "provisioned": { "mtime": "2023-07-06T10:03:25.231284828+02:00", "state": "true" } }, { "rid": "volume#2", "label": "foo001-vol-2", "status": "up", "type": "volume", "provisioned": { "mtime": "2023-07-06T10:03:30.127315837+02:00", "state": "true" } }, { "rid": "volume#3", "label": "foo001-vol-3", "status": "up", "type": "volume", "provisioned": { "mtime": "2023-07-06T10:03:35.211348039+02:00", "state": "true" } }, { "rid": "fs#1", "label": "flag /dev/shm/opensvc/svc/foo001/fs#1.flag", "status": "up", "type": "fs.flag", "provisioned": { "mtime": "2023-07-06T10:03:35.543350141+02:00", "state": "true" } } ], "updated_at": "2023-09-02T10:55:51.574173407+02:00" } }, "meta": { "node": "dev2n1", "object": "foo001" } }, ...
Configuration menu - View commit details
-
Copy full SHA for a8e805f - Browse repository at this point
Copy the full SHA a8e805fView commit details -
Stop using POST /object/monitor
Use POST /objet/action/<action> instead, in the objectaction package.
Configuration menu - View commit details
-
Copy full SHA for 9202652 - Browse repository at this point
Copy the full SHA 9202652View commit details -
Use POST /object/action/abort instead of /object/abort
And drop the POST /object/abort handler.
Configuration menu - View commit details
-
Copy full SHA for e8b7d43 - Browse repository at this point
Copy the full SHA e8b7d43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36d3ee9 - Browse repository at this point
Copy the full SHA 36d3ee9View commit details -
GET /node GET /node/config GET /node/status GET /node/monitor These handlers return list of meta+data items, suited for filtered by meta tabular outputs.
Configuration menu - View commit details
-
Copy full SHA for 167dbbf - Browse repository at this point
Copy the full SHA 167dbbfView commit details -
* POST /cluster/action/abort * POST /cluster/action/freeze * POST /cluster/action/unfreeze
Configuration menu - View commit details
-
Copy full SHA for 919f18b - Browse repository at this point
Copy the full SHA 919f18bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c21dbc - Browse repository at this point
Copy the full SHA 6c21dbcView commit details -
Rename "node abort" cmd as "cluster abort"
As "cluster freeze" and "cluster unfreeze" are the command to submit an orchestration, the orchestration abort must be in the same command subsystem.
Configuration menu - View commit details
-
Copy full SHA for 977ce60 - Browse repository at this point
Copy the full SHA 977ce60View commit details -
Fix the "om3 node drain" command
Set LocalExpect instead of State to "drained".
Configuration menu - View commit details
-
Copy full SHA for f586128 - Browse repository at this point
Copy the full SHA f586128View commit details -
Add the "om <sel> instance ls" command
Example: root@dev2n1:~/dev/om3# ./om3 "test/**" instance ls OBJ NODE AVAIL test/svc/svc1 dev2n1 n/a test/cfg/cfg1 dev2n1 n/a test/cfg/cfg1 dev2n3 n/a test/cfg/cfg1 dev2n2 n/a Also add support for adding columns to a default columning. Example: root@dev2n1:~/dev/om3# ./om3 "test/**" instance ls -o "+OVERALL:.data.status.overall" OBJ NODE AVAIL OVERALL test/cfg/cfg1 dev2n2 n/a n/a test/cfg/cfg1 dev2n1 n/a n/a test/svc/svc1 dev2n1 n/a n/a test/cfg/cfg1 dev2n3 n/a n/a This patch also rename the output.Renderer.Format field to output.Renderer.Output for alignment with the commandline --output.
Configuration menu - View commit details
-
Copy full SHA for 6a26c21 - Browse repository at this point
Copy the full SHA 6a26c21View commit details -
Configuration menu - View commit details
-
Copy full SHA for c145732 - Browse repository at this point
Copy the full SHA c145732View commit details -
Use []instance.ResourceMonitor as instance.Monitor.Resources type
Instead of a map.
Configuration menu - View commit details
-
Copy full SHA for 9c77ad5 - Browse repository at this point
Copy the full SHA 9c77ad5View commit details -
Add fine-grained "instance * ls" commands
* instance config ls * instance monitor ls * instance status ls In addition to instance ls that reports all of the above info.
Configuration menu - View commit details
-
Copy full SHA for 1347870 - Browse repository at this point
Copy the full SHA 1347870View commit details -
Revert to maps to repr res config monitor and status in instance
So the rid is not embeded in rcfg, rstat and rmon
Configuration menu - View commit details
-
Copy full SHA for 5d8f610 - Browse repository at this point
Copy the full SHA 5d8f610View commit details -
Rename resource.Status() to EvalStatus()
So the Status word is free to be used as a type.
Configuration menu - View commit details
-
Copy full SHA for 6f5c76f - Browse repository at this point
Copy the full SHA 6f5c76fView commit details -
Renames in the resource package
* ExposedStatus => Status * GetExposedStatus => GetStatus * exposedStatusInfo => getStatusInfo * exposedStatusInfoSched => getStatusInfoSched
Configuration menu - View commit details
-
Copy full SHA for a22c35a - Browse repository at this point
Copy the full SHA a22c35aView commit details -
And convert the "ls" command to use that. Also, * Fix the yaml properties stripped from their underscore. * Rename the drbd allocation ExpireAt to ExpiredAt
Configuration menu - View commit details
-
Copy full SHA for c6791bf - Browse repository at this point
Copy the full SHA c6791bfView commit details -
* GET /resource * GET /resource/config * GET /resource/monitor * GET /resource/status
Configuration menu - View commit details
-
Copy full SHA for 04e5cc6 - Browse repository at this point
Copy the full SHA 04e5cc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c4917d - Browse repository at this point
Copy the full SHA 4c4917dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e2c735 - Browse repository at this point
Copy the full SHA 1e2c735View commit details -
Configuration menu - View commit details
-
Copy full SHA for 823ae9e - Browse repository at this point
Copy the full SHA 823ae9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for df29284 - Browse repository at this point
Copy the full SHA df29284View commit details -
Add the "resource * ls" commandset
* resource ls * resource config ls * resource monitor ls * resource status ls
Configuration menu - View commit details
-
Copy full SHA for e21b55a - Browse repository at this point
Copy the full SHA e21b55aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d1d7b51 - Browse repository at this point
Copy the full SHA d1d7b51View commit details -
Don't exit from tab renderer on jsonpath find error
Report the error in the table cell and continue, so the user can easily see which part of the columning syntax is wrong.
Configuration menu - View commit details
-
Copy full SHA for 515f6ab - Browse repository at this point
Copy the full SHA 515f6abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53d1162 - Browse repository at this point
Copy the full SHA 53d1162View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9fae4e3 - Browse repository at this point
Copy the full SHA 9fae4e3View commit details