“CABUORCH-1669”的版本间的差异
来自qingwei personal wiki
(→rest api) |
|||
(未显示同一用户的9个中间版本) | |||
第5行: | 第5行: | ||
== scope == | == scope == | ||
+ | === UI === | ||
+ | https://mockflow.com/app/#Wireframe | ||
=== 时序图 === | === 时序图 === | ||
https://www.websequencediagrams.com/ | https://www.websequencediagrams.com/ | ||
+ | ==== Push ==== | ||
<pre> | <pre> | ||
title Push LB configuration | title Push LB configuration | ||
第26行: | 第29行: | ||
RPD Automation->UI: feed back of configure LB | RPD Automation->UI: feed back of configure LB | ||
</pre> | </pre> | ||
+ | ==== Delete ==== | ||
+ | <pre> | ||
+ | title Delete LB configuration | ||
+ | |||
+ | note left of UI: Delete RPD configuration | ||
+ | UI->+Rest Service: Delete RPD | ||
+ | Rest Service->+DB: Delete | ||
+ | DB-->-Rest Service: | ||
+ | Rest Service-->-UI: | ||
+ | Rest Service->+RPD Automation: Unconfigure | ||
+ | RPD Automation->RPD Automation: Recover docsis-group ID | ||
+ | RPD Automation->+NSO: Unconfigure LB | ||
+ | NSO->+cBR8: Unconfigure | ||
+ | cBR8-->-NSO: | ||
+ | NSO-->-RPD Automation: | ||
+ | RPD Automation-->Rest Service: feed back of configure LB | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | === NSO === | ||
+ | ==== push ==== | ||
+ | <source lang="xml"> | ||
+ | <!-- 注意! 当前我们只需要提取docsic-group ID 即可--> | ||
+ | |||
+ | bash-4.2# curl -i -u admin:admin -H "Accept:application/vnd.yang.data+xml" -s http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:cable/load-balance/docsis-group | ||
+ | HTTP/1.1 200 OK | ||
+ | Server: | ||
+ | Date: Wed, 20 Jun 2018 02:29:21 GMT | ||
+ | Last-Modified: Mon, 18 Jun 2018 19:48:03 GMT | ||
+ | Cache-Control: private, no-cache, must-revalidate, proxy-revalidate | ||
+ | Etag: 1529-459283-108651 | ||
+ | Content-Type: application/vnd.yang.data+xml | ||
+ | Transfer-Encoding: chunked | ||
+ | Pragma: no-cache | ||
+ | |||
+ | |||
+ | <docsis-group xmlns="urn:ios" xmlns:y="http://tail-f.com/ns/rest" xmlns:ios="urn:ios" xmlns:ncs="http://tail-f.com/ns/ncs"> | ||
+ | <docsis-group-list> | ||
+ | <docsis-group-id>10011</docsis-group-id> | ||
+ | </docsis-group-list> | ||
+ | <docsis-group-list> | ||
+ | <docsis-group-id>10012</docsis-group-id> | ||
+ | </docsis-group-list> | ||
+ | <docsis-group-list> | ||
+ | <docsis-group-id>10013</docsis-group-id> | ||
+ | </docsis-group-list> | ||
+ | </docsis-group> | ||
+ | |||
+ | </source> | ||
+ | |||
+ | ==== delete ==== | ||
+ | <source lang="shell"> | ||
+ | curl -i -u admin:admin -X "DELETE" http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:cable/load-balance/docsis-group/docsis-group-list/1 | ||
+ | </source> | ||
+ | |||
+ | == test == | ||
+ | === rest api === | ||
+ | <source lang="json"> | ||
+ | set-service-template | ||
+ | "case 1" | ||
+ | { | ||
+ | "autoAccept": false, | ||
+ | "defaultFlag": false, | ||
+ | "elementsList": [ | ||
+ | { | ||
+ | "description": "16x4 DS/US SG channels", | ||
+ | "downstreamControllerProfile": 1, | ||
+ | "eventProfile": 0, | ||
+ | "rdtiConfig": 20, | ||
+ | "serviceGroupName": "tfchan_SG", | ||
+ | "serviceType": "Data", | ||
+ | "upstreamControllerProfile": 1 | ||
+ | } | ||
+ | ], | ||
+ | "name": "qingwyan2", | ||
+ | "loadBalanceXml": "<config-template xmlns='http://tail-f.com/ns/config/1.0'><devices xmlns='http://tail-f.com/ns/ncs'><device><name>{$DEVICE}</name><config><cable xmlns='urn:ios'><load-balance><docsis-group><docsis-group-list><docsis-group-id>10011</docsis-group-id><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-3 8-11</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>0-3</us-channel></Upstream-Cable></upstream><method><type>utilization</type><us-method>modems</us-method></method><threshold><load><percentage>30</percentage></load><stability>70</stability></threshold><policy>pure-ds-load</policy><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list></docsis-group></load-balance></cable></config></device></devices></config-template>" | ||
+ | } | ||
+ | |||
+ | "case 2" | ||
+ | { | ||
+ | "autoAccept": false, | ||
+ | "defaultFlag": false, | ||
+ | "elementsList": [ | ||
+ | { | ||
+ | "description": "16x4 DS/US SG channels", | ||
+ | "downstreamControllerProfile": 1, | ||
+ | "eventProfile": 0, | ||
+ | "rdtiConfig": 20, | ||
+ | "serviceGroupName": "tfchan_SG", | ||
+ | "serviceType": "Data", | ||
+ | "upstreamControllerProfile": 1 | ||
+ | } | ||
+ | ], | ||
+ | "name": "qingwyan2", | ||
+ | "loadBalanceXml": "<config-template xmlns='http://tail-f.com/ns/config/1.0'><devices xmlns='http://tail-f.com/ns/ncs'><device><name>{$DEVICE}</name><config><cable xmlns='urn:ios'><load-balance><docsis-group><docsis-group-list><docsis-group-id>10011</docsis-group-id><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-3 8-11</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>0-3</us-channel></Upstream-Cable></upstream><method><type>utilization</type><us-method>modems</us-method></method><threshold><load><percentage>30</percentage></load><stability>70</stability></threshold><policy>pure-ds-load</policy><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list><docsis-group-list><docsis-group-id>10012</docsis-group-id><restricted/><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-3 8-11 18-21 26-29</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>4</us-channel></Upstream-Cable></upstream><interval>5</interval><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list><docsis-group-list><docsis-group-id>10013</docsis-group-id><restricted/><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-31</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>1-4</us-channel></Upstream-Cable></upstream><threshold><load><minimum>1</minimum></load></threshold><interval>5</interval><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list></docsis-group></load-balance></cable></config></device></devices></config-template>" | ||
+ | } | ||
+ | </source> |
2018年7月6日 (五) 07:14的最新版本
目录
scope
UI
https://mockflow.com/app/#Wireframe
时序图
https://www.websequencediagrams.com/
Push
title Push LB configuration note left of UI: Push RPD configuration UI->+Rest Service: LB xml Rest Service->+DB: persist DB-->-Rest Service: Rest Service-->-UI: note left of RPD Automation: Pre-configure or Gcp UP RPD Automation->RPD Automation: Generate docsis-group ID note left of RPD Automation: Waiting RPD push RPD Automation->RPD Automation: Get DS/US from RPD RPD Automation->+NSO: Replace XML's docsic-group\n and DS US NSO->+cBR8: push configuration cBR8-->-NSO: NSO-->-RPD Automation: RPD Automation->UI: feed back of configure LB
Delete
title Delete LB configuration note left of UI: Delete RPD configuration UI->+Rest Service: Delete RPD Rest Service->+DB: Delete DB-->-Rest Service: Rest Service-->-UI: Rest Service->+RPD Automation: Unconfigure RPD Automation->RPD Automation: Recover docsis-group ID RPD Automation->+NSO: Unconfigure LB NSO->+cBR8: Unconfigure cBR8-->-NSO: NSO-->-RPD Automation: RPD Automation-->Rest Service: feed back of configure LB
NSO
push
<!-- 注意! 当前我们只需要提取docsic-group ID 即可-->
bash-4.2# curl -i -u admin:admin -H "Accept:application/vnd.yang.data+xml" -s http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:cable/load-balance/docsis-group
HTTP/1.1 200 OK
Server:
Date: Wed, 20 Jun 2018 02:29:21 GMT
Last-Modified: Mon, 18 Jun 2018 19:48:03 GMT
Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
Etag: 1529-459283-108651
Content-Type: application/vnd.yang.data+xml
Transfer-Encoding: chunked
Pragma: no-cache
<docsis-group xmlns="urn:ios" xmlns:y="http://tail-f.com/ns/rest" xmlns:ios="urn:ios" xmlns:ncs="http://tail-f.com/ns/ncs">
<docsis-group-list>
<docsis-group-id>10011</docsis-group-id>
</docsis-group-list>
<docsis-group-list>
<docsis-group-id>10012</docsis-group-id>
</docsis-group-list>
<docsis-group-list>
<docsis-group-id>10013</docsis-group-id>
</docsis-group-list>
</docsis-group>
delete
curl -i -u admin:admin -X "DELETE" http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:cable/load-balance/docsis-group/docsis-group-list/1
test
rest api
set-service-template
"case 1"
{
"autoAccept": false,
"defaultFlag": false,
"elementsList": [
{
"description": "16x4 DS/US SG channels",
"downstreamControllerProfile": 1,
"eventProfile": 0,
"rdtiConfig": 20,
"serviceGroupName": "tfchan_SG",
"serviceType": "Data",
"upstreamControllerProfile": 1
}
],
"name": "qingwyan2",
"loadBalanceXml": "<config-template xmlns='http://tail-f.com/ns/config/1.0'><devices xmlns='http://tail-f.com/ns/ncs'><device><name>{$DEVICE}</name><config><cable xmlns='urn:ios'><load-balance><docsis-group><docsis-group-list><docsis-group-id>10011</docsis-group-id><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-3 8-11</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>0-3</us-channel></Upstream-Cable></upstream><method><type>utilization</type><us-method>modems</us-method></method><threshold><load><percentage>30</percentage></load><stability>70</stability></threshold><policy>pure-ds-load</policy><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list></docsis-group></load-balance></cable></config></device></devices></config-template>"
}
"case 2"
{
"autoAccept": false,
"defaultFlag": false,
"elementsList": [
{
"description": "16x4 DS/US SG channels",
"downstreamControllerProfile": 1,
"eventProfile": 0,
"rdtiConfig": 20,
"serviceGroupName": "tfchan_SG",
"serviceType": "Data",
"upstreamControllerProfile": 1
}
],
"name": "qingwyan2",
"loadBalanceXml": "<config-template xmlns='http://tail-f.com/ns/config/1.0'><devices xmlns='http://tail-f.com/ns/ncs'><device><name>{$DEVICE}</name><config><cable xmlns='urn:ios'><load-balance><docsis-group><docsis-group-list><docsis-group-id>10011</docsis-group-id><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-3 8-11</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>0-3</us-channel></Upstream-Cable></upstream><method><type>utilization</type><us-method>modems</us-method></method><threshold><load><percentage>30</percentage></load><stability>70</stability></threshold><policy>pure-ds-load</policy><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list><docsis-group-list><docsis-group-id>10012</docsis-group-id><restricted/><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-3 8-11 18-21 26-29</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>4</us-channel></Upstream-Cable></upstream><interval>5</interval><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list><docsis-group-list><docsis-group-id>10013</docsis-group-id><restricted/><downstream><Downstream-Cable><name>7/0/1</name><rf-channel>0-31</rf-channel></Downstream-Cable></downstream><upstream><Upstream-Cable><name>7/0/2</name><us-channel>1-4</us-channel></Upstream-Cable></upstream><threshold><load><minimum>1</minimum></load></threshold><interval>5</interval><init-tech-list><grouplist>4</grouplist></init-tech-list></docsis-group-list></docsis-group></load-balance></cable></config></device></devices></config-template>"
}