@@ -328,9 +328,6 @@ In the following example we ask master SAE Carol for a key which is shared with
328328<pre >
329329 $ <b >./manager.py topology.yaml etsi-qkd carol celia get-key</b >
330330Invoke ETSI QKD Get Key API for client carol on port 8105
331- master_sae_id='carol' slave_sae_id='celia'
332- url='http://127.0.0.1:8105/dske/client/etsi/api/v1/keys/celia/enc_keys'
333- response=<Response [200] >
334331{
335332 "keys": {
336333 "key_ID": "f47f23d7-be01-41d3-a5bc-106b2335e652",
@@ -369,7 +366,6 @@ f47f23d7-be01-41d3-a5bc-106b2335e652 which was established with master SAE Carol
369366<pre >
370367$ <b >./manager.py topology.yaml etsi-qkd carol celia get-key-with-key-ids f47f23d7-be01-41d3-a5bc-106b2335e652</b >
371368Invoke ETSI QKD Get Key with Key IDs API for client celia on port 8105
372- slave_client_name='celia' master_sae_id='carol' f47f23d7-be01-41d3-a5bc-106b2335e652
373369{
374370 "keys": [
375371 {
@@ -401,15 +397,13 @@ In the following example, we ask for a key pair between master SAE Carol and sla
401397<pre >
402398$ <b >./manager.py topology.yaml etsi-qkd carol celia get-key-pair</b >
403399Invoke ETSI QKD Get Key API for client carol on port 8105
404- master_sae_id='carol' slave_sae_id='celia'
405400{
406401 "keys": {
407402 "key_ID": "cc658ffe-8d54-414b-b91f-20b59b03f034",
408403 "key": "jSOFUh56slAChUrzUExdbQ=="
409404 }
410405}
411406Invoke ETSI QKD Get Key with Key IDs API for client celia on port 8106
412- master_sae_id='carol' slave_sae_id='celia' cc658ffe-8d54-414b-b91f-20b59b03f034
413407{
414408 "keys": [
415409 {
@@ -442,12 +436,6 @@ master_sae_id='carol' slave_sae_id='celia'
442436}
443437</pre >
444438
445-
446- Note: The implementation of the ETSI QKD API interface is far from complete.
447- The ` size ` and ` number ` GET parameters are not yet supported.
448- ` POST ` methods are not yet supported.
449- Multicast keys are not yet supported.
450-
451439## Report the topology status
452440
453441Use the manager ` status ` command to report the status of each node in the topology:
@@ -456,53 +444,36 @@ Use the manager `status` command to report the status of each node in the topolo
456444$ <b >./manager.py topology.yaml status</b >
457445Status for hub hank on port 8100
458446{
459- "hub_name ": "hank",
447+ "name ": "hank",
460448 "peer_clients": [
461449 {
462450 "client_name": "carol",
463- "pool ": {
451+ "local_pool ": {
464452 "blocks": [
465453 {
466- "uuid": "14c4f032-ce4c-4b9a-8ce9-bda65a5a18e5 ",
467- "size": 1000 ,
454+ "uuid": "4cb97ab1-0e3f-4f48-a0d7-90de58e85d53 ",
455+ "size": 2000 ,
468456 "data": "AAAAAAAAAAAAAA==...",
469- "allocated ": 18 ,
470- "consumed ": 16
457+ "nr_used_bytes ": 32 ,
458+ "nr_unused_bytes ": 1968
471459 }
472- ]
473- }
474- },
475- ... snip ...
476- {
477- "hub_name": "holly",
478- "registered": true,
479- "psrd_pool": {
460+ ],
461+ "owner": "local"
462+ },
463+ "peer_pool": {
480464 "blocks": [
481465 {
482- "uuid": "67193b56-13fe-4e43-a42c-103097fcdbae ",
483- "size": 1000 ,
484- "data": "hGV7ypmUQBiiBQ ==...",
485- "allocated ": 0 ,
486- "consumed ": 0
466+ "uuid": "c142de3a-8464-440f-bbfd-78937481732a ",
467+ "size": 2000 ,
468+ "data": "AAAAAAAAAAAAAA ==...",
469+ "nr_used_bytes ": 48 ,
470+ "nr_unused_bytes ": 1952
487471 }
488- ]
472+ ],
473+ "owner": "peer"
489474 }
490475 },
491- {
492- "hub_name": "hugo",
493- "registered": true,
494- "psrd_pool": {
495- "blocks": [
496- {
497- "uuid": "64ba8d8f-d26c-498f-854a-123346074072",
498- "size": 1000,
499- "data": "iSZnsqd1CSIEWw==...",
500- "allocated": 0,
501- "consumed": 0
502- }
503- ]
504- }
505- }
476+ ... snip ...
506477 ]
507478}
508479</pre >
@@ -514,24 +485,37 @@ client or hub node, for example:
514485$ <b >./manager.py topology.yaml --client celia status</b >
515486Status for client celia on port 8106
516487{
517- "client_name ": "celia",
488+ "name ": "celia",
518489 "peer_hubs": [
519- ... snip ...
520490 {
521- "hub_name": "hugo ",
491+ "hub_name": "hank ",
522492 "registered": true,
523- "psrd_pool": {
493+ "local_pool": {
494+ "blocks": [
495+ {
496+ "uuid": "03478f57-a705-4c9c-940e-58ff5d9b52ea",
497+ "size": 2000,
498+ "data": "AAAAAAAAAAAAAA==...",
499+ "nr_used_bytes": 32,
500+ "nr_unused_bytes": 1968
501+ }
502+ ],
503+ "owner": "local"
504+ },
505+ "peer_pool": {
524506 "blocks": [
525507 {
526- "uuid": "78a32566-5ee1-4adb-b468-91c12ae4920c ",
527- "size": 1000 ,
508+ "uuid": "b7f83d46-c982-41d9-ba35-4965471bb56a ",
509+ "size": 2000 ,
528510 "data": "AAAAAAAAAAAAAA==...",
529- "allocated ": 18 ,
530- "consumed ": 16
511+ "nr_used_bytes ": 48 ,
512+ "nr_unused_bytes ": 1952
531513 }
532- ]
514+ ],
515+ "owner": "peer"
533516 }
534- }
517+ },
518+ ... snip ...
535519 ]
536520}
537521</pre >
@@ -550,16 +534,19 @@ $ <b>./manager.py topology.yaml --client carol status | tail -n +2 | jq</b>
550534 "local_pool": {
551535 "blocks": [
552536 {
553- "uuid": "266458ba-b183-42e9-9f5d-1c1113170d07 ",
537+ "uuid": "c142de3a-8464-440f-bbfd-78937481732a ",
554538 "size": 2000,
555- "data": "ehqm+BghWSm0+A ==...",
556- "allocated ": 0 ,
557- "consumed ": 0
539+ "data": "AAAAAAAAAAAAAA ==...",
540+ "nr_used_bytes ": 48 ,
541+ "nr_unused_bytes ": 1952
558542 }
559543 ],
560- "owner": "Owner.LOCAL "
544+ "owner": "local "
561545 },
562- ...
546+ ... snip ...
547+ }
548+ ]
549+ }
563550</pre >
564551
565552Even better, you can use the ` pq ` command with a query to look for specific fields in the JSON
@@ -568,18 +555,18 @@ In the following example we display the information about the local pool for pee
568555on client carol:
569556
570557<pre >
571- $ <b >./manager.py topology.yaml --client carol status | tail -n +2 | jq '(.peer_hubs[] | select(.hub_name == "hank") .local_pool)</b >
558+ $ <b >./manager.py topology.yaml --client carol status | tail -n +2 | jq '(.peer_hubs[] | select(.hub_name == "hank") .local_pool)' </b >
572559{
573560 "blocks": [
574561 {
575- "uuid": "266458ba-b183-42e9-9f5d-1c1113170d07 ",
562+ "uuid": "c142de3a-8464-440f-bbfd-78937481732a ",
576563 "size": 2000,
577- "data": "ehqm+BghWSm0+A ==...",
578- "allocated ": 0 ,
579- "consumed ": 0
564+ "data": "AAAAAAAAAAAAAA ==...",
565+ "nr_used_bytes ": 48 ,
566+ "nr_unused_bytes ": 1952
580567 }
581568 ],
582- "owner": "Owner.LOCAL "
569+ "owner": "local "
583570}
584571</pre >
585572
@@ -591,19 +578,33 @@ For example, the log file for client carol is `client-carol.out`:
591578
592579<pre >
593580$ <b >cat client-carol.out</b >
594- INFO: Started server process [81636 ]
581+ INFO: Started server process [2353 ]
595582INFO: Waiting for application startup.
583+ INFO: Begin register task for peer hub None
584+ INFO: Begin register task for peer hub None
585+ INFO: Begin register task for peer hub None
586+ INFO: Begin register task for peer hub None
587+ INFO: Begin register task for peer hub None
596588INFO: Application startup complete.
597589INFO: Uvicorn running on http://127.0.0.1:8105 (Press CTRL+C to quit)
598- INFO: 127.0.0.1:56441 - "GET /docs HTTP/1.1" 200 OK
599- INFO: 127.0.0.1:56441 - "GET /openapi.json HTTP/1.1" 200 OK
600- Share constructor: value=b'\xd4\x0b\xcf\xf2D\x83\x03R\x84\xc7\n\xd1#X\xd3`' encrypted_value=None
601- Share constructor: value=b'-kD\x06\x99\xb2E\xc2\xd5\xf0\xb3z\xd0Oyn' encrypted_value=None
602- Share constructor: value=b'\x11\x9c\x84\x19\x93\xed\xac\xa516Z\x07\xfaf\xe7\xfa' encrypted_value=None
603- Share constructor: value=b'\xe8\xfc\x0f\xedN\xdc\xea5`\x01\xe3\xac\tqM\xf4' encrypted_value=None
604- Share constructor: value=b'\xf5yZ_2o\xca\xba\xa9tN<\x1adLa' encrypted_value=None
605- api_share=APIShare(client_name='carol', key_id='6050fccc-b882-402e-8ca1-62f0147999de', share_index=0, encrypted_value='e2wgFBkt7R8FGubnZesLJw==', encryption_key_allocation=APIAllocation(fragments=[APIFragment(block_uuid='14c4f032-ce4c-4b9a-8ce9-bda65a5a18e5', start_byte=0, size=16)]), signature_key_allocation=APIAllocation(fragments=[APIFragment(block_uuid='14c4f032-ce4c-4b9a-8ce9-bda65a5a18e5', start_byte=16, size=2)]))
606- url='http://127.0.0.1:8100/dske/hub/api/v1/key-share'
590+ INFO: Call PUT http://127.0.0.1:8100/hub/hank/dske/oob/v1/registration 200
591+ INFO: Call PUT http://127.0.0.1:8101/hub/helen/dske/oob/v1/registration 200
592+ INFO: Call PUT http://127.0.0.1:8103/hub/holly/dske/oob/v1/registration 200
593+ INFO: Finish register task for peer hub None
594+ INFO: Finish register task for peer hub None
595+ INFO: Finish register task for peer hub None
596+ INFO: Call PUT http://127.0.0.1:8102/hub/hilary/dske/oob/v1/registration 200
597+ INFO: Call PUT http://127.0.0.1:8104/hub/hugo/dske/oob/v1/registration 200
598+ INFO: Begin request PSRD task for peer hub hank and pool owner local
599+ INFO: Begin request PSRD task for peer hub hank and pool owner peer
600+ INFO: Begin request PSRD task for peer hub helen and pool owner local
601+ INFO: Begin request PSRD task for peer hub helen and pool owner peer
602+ INFO: Begin request PSRD task for peer hub holly and pool owner local
603+ INFO: Begin request PSRD task for peer hub holly and pool owner peer
604+ INFO: Finish register task for peer hub None
605+ INFO: Finish register task for peer hub None
606+ INFO: Begin request PSRD task for peer hub hilary and pool owner local
607+ INFO: Begin request PSRD task for peer hub hilary and pool owner peer
607608... snip ...
608609</pre >
609610
@@ -667,48 +668,32 @@ In this example, we pipe the output of `curl` through `jq` (JSON query) to prett
667668JSON REST response:
668669
669670<pre >
670- $ <b >curl --silent http://127.0.0.1:8100/dske/ hub/mgmt/v1/status | jq</b >
671+ $ <b >curl --silent http://127.0.0.1:8100/hub/hank /mgmt/v1/status | jq</b >
671672{
672- "hub_name ": "hank",
673+ "name ": "hank",
673674 "peer_clients": [
674675 {
675676 "client_name": "carol",
676- "pool": {
677- "blocks": [
678- {
679- "uuid": "14c4f032-ce4c-4b9a-8ce9-bda65a5a18e5",
680- "size": 1000,
681- "data": "AAAAAAAAAAAAAA==...",
682- "allocated": 18,
683- "consumed": 16
684- }
685- ]
686- }
687- },
688- {
689- "client_name": "celia",
690- "pool": {
677+ "local_pool": {
691678 "blocks": [
692679 {
693- "uuid": "7734118a-24f6-4fb0-9cba-8d00bbbaedc7 ",
694- "size": 1000 ,
680+ "uuid": "4cb97ab1-0e3f-4f48-a0d7-90de58e85d53 ",
681+ "size": 2000 ,
695682 "data": "AAAAAAAAAAAAAA==...",
696- "allocated ": 18 ,
697- "consumed ": 18
683+ "nr_used_bytes ": 32 ,
684+ "nr_unused_bytes ": 1968
698685 }
699- ]
700- }
701- },
702- ... snip ...
686+ ],
687+ "owner": "local"
688+ },
689+ ... snip ...
690+ }
703691 ],
704692 "shares": [
705693 {
706- "key_id": "6050fccc-b882-402e-8ca1-62f0147999de ",
694+ "key_id": "bc266858-9c0e-4d9b-8d48-b7f312b1aeb5 ",
707695 "share_index": 0,
708- "value": "1AvP8kSDA1KExw==...",
709- "encrypted_value": null,
710- "encryption_key_allocation": null,
711- "signature_key_allocation": null
696+ "value": "+xLr39AZfdNefw==..."
712697 }
713698 ]
714699}
0 commit comments