-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PISTON-1112: fix validation of agent pause timeout/time-limit (#6617)
- schema validates system_config.acdc default_agent_pause_timeout for non-negative integers or the "infinity" special string - refactored out ?DEFAULT_AGENT_PAUSE_TIMEOUT into shared header - fixed acdc_maintenance expecting integer, despite possibility of <<"infinity">> value - moved Time-Limit validation in kapi_acdc_agent into PAUSE_* macros rather than AGENT_* PISTON-1119: add incorrectly gitignored kapi.acdc_agent schemas - the rule *.log* in the root gitignore ignored these files :/ - remove Time-Limit from these schemas PISTON-1122: Time-Limit should be optional in agent.pause AMQP events - retain support for using default by omitting `"timeout"` from pause API reqs
- Loading branch information
1 parent
02ec35e
commit d1ae993
Showing
15 changed files
with
253 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,9 +37,6 @@ | |
}, | ||
"Queue-ID": { | ||
"type": "string" | ||
}, | ||
"Time-Limit": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
|
47 changes: 47 additions & 0 deletions
47
applications/crossbar/priv/couchdb/schemas/kapi.acdc_agent.login.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "kapi.acdc_agent.login", | ||
"description": "AMQP API for acdc_agent.login", | ||
"properties": { | ||
"Account-ID": { | ||
"type": "string" | ||
}, | ||
"Agent-ID": { | ||
"type": "string" | ||
}, | ||
"Event-Category": { | ||
"enum": [ | ||
"agent" | ||
], | ||
"type": "string" | ||
}, | ||
"Event-Name": { | ||
"enum": [ | ||
"login" | ||
], | ||
"type": "string" | ||
}, | ||
"Presence-ID": { | ||
"type": "string" | ||
}, | ||
"Presence-State": { | ||
"enum": [ | ||
"trying", | ||
"online", | ||
"offline", | ||
"early", | ||
"confirmed", | ||
"terminated" | ||
], | ||
"type": "string" | ||
}, | ||
"Queue-ID": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Account-ID", | ||
"Agent-ID" | ||
], | ||
"type": "object" | ||
} |
47 changes: 47 additions & 0 deletions
47
applications/crossbar/priv/couchdb/schemas/kapi.acdc_agent.login_queue.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "kapi.acdc_agent.login_queue", | ||
"description": "AMQP API for acdc_agent.login_queue", | ||
"properties": { | ||
"Account-ID": { | ||
"type": "string" | ||
}, | ||
"Agent-ID": { | ||
"type": "string" | ||
}, | ||
"Event-Category": { | ||
"enum": [ | ||
"agent" | ||
], | ||
"type": "string" | ||
}, | ||
"Event-Name": { | ||
"enum": [ | ||
"login_queue" | ||
], | ||
"type": "string" | ||
}, | ||
"Presence-ID": { | ||
"type": "string" | ||
}, | ||
"Presence-State": { | ||
"enum": [ | ||
"trying", | ||
"online", | ||
"offline", | ||
"early", | ||
"confirmed", | ||
"terminated" | ||
], | ||
"type": "string" | ||
}, | ||
"Queue-ID": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Account-ID", | ||
"Agent-ID" | ||
], | ||
"type": "object" | ||
} |
30 changes: 30 additions & 0 deletions
30
applications/crossbar/priv/couchdb/schemas/kapi.acdc_agent.login_resp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "kapi.acdc_agent.login_resp", | ||
"description": "AMQP API for acdc_agent.login_resp", | ||
"properties": { | ||
"Event-Category": { | ||
"enum": [ | ||
"agent" | ||
], | ||
"type": "string" | ||
}, | ||
"Event-Name": { | ||
"enum": [ | ||
"login_resp" | ||
], | ||
"type": "string" | ||
}, | ||
"Status": { | ||
"enum": [ | ||
"success", | ||
"failed" | ||
], | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Status" | ||
], | ||
"type": "object" | ||
} |
47 changes: 47 additions & 0 deletions
47
applications/crossbar/priv/couchdb/schemas/kapi.acdc_agent.logout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "kapi.acdc_agent.logout", | ||
"description": "AMQP API for acdc_agent.logout", | ||
"properties": { | ||
"Account-ID": { | ||
"type": "string" | ||
}, | ||
"Agent-ID": { | ||
"type": "string" | ||
}, | ||
"Event-Category": { | ||
"enum": [ | ||
"agent" | ||
], | ||
"type": "string" | ||
}, | ||
"Event-Name": { | ||
"enum": [ | ||
"logout" | ||
], | ||
"type": "string" | ||
}, | ||
"Presence-ID": { | ||
"type": "string" | ||
}, | ||
"Presence-State": { | ||
"enum": [ | ||
"trying", | ||
"online", | ||
"offline", | ||
"early", | ||
"confirmed", | ||
"terminated" | ||
], | ||
"type": "string" | ||
}, | ||
"Queue-ID": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Account-ID", | ||
"Agent-ID" | ||
], | ||
"type": "object" | ||
} |
Oops, something went wrong.