a little nicer wrt pep8
[sfa.git] / docs / Geniwrapper_Design_Docu.html
1
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3
4 <html>
5
6
7 <head>
8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9
10 <base target="_top">
11
12 <style type="text/css">
13
14
15 /* default css */
16
17 table {
18   font-size: 1em;
19   line-height: inherit;
20 }
21
22
23 tr {
24   
25   text-align: left;
26   
27 }
28
29
30 div, address, ol, ul, li, option, select { 
31   margin-top: 0px;
32   margin-bottom: 0px;
33 }
34
35 p {
36   margin: 0px;
37 }
38
39 body {
40   margin: 6px;
41   padding: 0px;
42   font-family: Verdana, sans-serif;
43   font-size: 10pt;
44   background-color: #ffffff;
45 }
46
47
48 img {
49   -moz-force-broken-image-icon: 1;
50 }
51
52 @media screen {
53   html.pageview {
54     background-color: #f3f3f3 !important;
55   }
56
57   
58     
59   body { 
60     min-height: 1100px; 
61   }
62   * html body { 
63     height: 1100px; 
64   }
65   .pageview body {
66     border-top: 1px solid #ccc;
67     border-left: 1px solid #ccc;
68     border-right: 2px solid #bbb;
69     border-bottom: 2px solid #bbb;
70     width: 648px !important;
71     margin: 15px auto 25px;
72     padding: 40px 50px; 
73   }
74   /* IE6 */
75   * html {
76     overflow-y: scroll;
77   }
78   * html.pageview body {
79     overflow-x: auto;
80   }
81   /* Prevent repaint errors when scrolling in Safari. This "Star-7" css hack
82      targets Safari 3.1, but not WebKit nightlies and presumably Safari 4.
83      That's OK because this bug is fixed in WebKit nightlies/Safari 4 :-). */
84   html*#wys_frame::before {
85     content: '\A0';
86     position: fixed;
87     overflow: hidden;
88     width: 0;
89     height: 0;
90     top: 0;
91     left: 0;
92   }
93   
94   
95
96   
97     .writely-callout-data {
98       display: none;
99     }
100     .writely-footnote-marker {
101       background-image: url('MISSING');
102       background-color: transparent;
103       background-repeat: no-repeat;
104       width: 7px;
105       overflow: hidden;
106       height: 16px;
107       vertical-align: top;
108     }
109     .editor .writely-footnote-marker {
110       cursor: move;
111     }
112     .writely-footnote-marker-highlight {
113       background-position: -15px 0;
114     }
115     .writely-footnote-hide-selection ::-moz-selection, .writely-footnote-hide-selection::-moz-selection {
116       background: transparent;
117     }
118     .writely-footnote-hide-selection ::selection, .writely-footnote-hide-selection::selection {
119       background: transparent;
120     }
121     .writely-footnote-hide-selection {
122       cursor: move;
123     }
124
125     
126     .editor .writely-comment-yellow {
127       background-color: #FF9;
128       background-position: -240px 0;
129     }
130     .editor .writely-comment-yellow-hover {
131       background-color: #FF0;
132       background-position: -224px 0;
133     }
134     .editor .writely-comment-blue {
135       background-color: #C0D3FF;
136       background-position: -16px 0;
137     }
138     .editor .writely-comment-blue-hover {
139       background-color: #6292FE;
140       background-position: 0 0;
141     }
142     .editor .writely-comment-orange {
143       background-color: #FFDEAD;
144       background-position: -80px 0;
145     }
146     .editor .writely-comment-orange-hover {
147       background-color: #F90;
148       background-position: -64px 0;
149     }
150     .editor .writely-comment-green {
151       background-color: #99FBB3;
152       background-position: -48px 0;
153     }
154     .editor .writely-comment-green-hover {
155       background-color: #00F442;
156       background-position: -32px 0;
157     }
158     .editor .writely-comment-cyan {
159       background-color: #CFF;
160       background-position: -208px 0;
161     }
162     .editor .writely-comment-cyan-hover {
163       background-color: #0FF;
164       background-position: -192px 0;
165     }
166     .editor .writely-comment-purple {
167       background-color: #EBCCFF;
168       background-position: -144px 0;
169     }
170     .editor .writely-comment-purple-hover {
171       background-color: #90F;
172       background-position: -128px 0;
173     }
174     .editor .writely-comment-magenta {
175       background-color: #FCF;
176       background-position: -112px 0;
177     }
178     .editor .writely-comment-magenta-hover {
179       background-color: #F0F;
180       background-position: -96px 0;
181     }
182     .editor .writely-comment-red {
183       background-color: #FFCACA;
184       background-position: -176px 0;
185     }
186     .editor .writely-comment-red-hover {
187       background-color: #FF7A7A;
188       background-position: -160px 0;
189     }
190     
191     .editor .writely-comment-marker {
192       background-image: url('MISSING');
193       background-color: transparent;
194       padding-right: 11px;
195       background-repeat: no-repeat;
196       width: 16px;
197       height: 16px;
198       -moz-user-select: none;
199     }
200
201     .editor .writely-comment-hidden {
202       padding: 0;
203       background: none;
204     }
205     .editor .writely-comment-marker-hidden {
206       background: none;
207       padding: 0;
208       width: 0;
209     }
210     .editor .writely-comment-none {
211       opacity: .2;
212       filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
213       -moz-opacity: .2;
214     }
215     .editor .writely-comment-none-hover {
216       opacity: .2;
217       filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
218       -moz-opacity: .2;
219     }
220   
221
222
223   
224   .br_fix br:not(:-moz-last-node):not(:-moz-first-node) {
225     
226     position:relative;
227     
228     left: -1ex
229     
230   }
231   
232   .br_fix br+br {
233     position: static !important
234   }
235 }
236
237 h6 { font-size: 8pt }
238 h5 { font-size: 8pt }
239 h4 { font-size: 10pt }
240 h3 { font-size: 12pt }
241 h2 { font-size: 14pt }
242 h1 { font-size: 18pt }
243
244 blockquote {padding: 10px; border: 1px #DDD dashed }
245
246 a img {border: 0}
247
248 .pb {
249   border-width: 0;
250   page-break-after: always;
251   /* We don't want this to be resizeable, so enforce a width and height
252      using !important */
253   height: 1px !important;
254   width: 100% !important;
255 }
256
257 .editor .pb {
258   border-top: 1px dashed #C0C0C0;
259   border-bottom: 1px dashed #C0C0C0;
260 }
261
262 div.google_header, div.google_footer {
263   position: relative;
264   margin-top: 1em;
265   margin-bottom: 1em;
266 }
267
268
269 /* Table of contents */
270 .editor div.writely-toc {
271   background-color: #f3f3f3;
272   border: 1px solid #ccc;
273 }
274 .writely-toc > ol {
275   padding-left: 3em;
276   font-weight: bold;
277 }
278 ol.writely-toc-subheading {
279   padding-left: 1em;
280   font-weight: normal;
281 }
282 /* IE6 only */
283 * html writely-toc ol {
284   list-style-position: inside;
285 }
286 .writely-toc-none {
287   list-style-type: none;
288 }
289 .writely-toc-decimal {
290   list-style-type: decimal;
291 }
292 .writely-toc-upper-alpha {
293   list-style-type: upper-alpha;
294 }
295 .writely-toc-lower-alpha {
296   list-style-type: lower-alpha;
297 }
298 .writely-toc-upper-roman {
299   list-style-type: upper-roman;
300 }
301 .writely-toc-lower-roman {
302   list-style-type: lower-roman;
303 }
304 .writely-toc-disc {
305   list-style-type: disc;
306 }
307
308 /* end default css */
309
310
311   /* default print css */
312   
313   @media print {
314     body { 
315       padding: 0; 
316       margin: 0; 
317     }
318
319     div.google_header, div.google_footer {
320       display: block;
321       min-height: 0;
322       border: none;
323     }
324
325     div.google_header {
326       flow: static(header);
327     }
328
329     /* used to insert page numbers */
330     div.google_header::before, div.google_footer::before {
331       position: absolute;
332       top: 0;
333     }
334
335     div.google_footer {
336       flow: static(footer);
337     }
338
339     /* always consider this element at the start of the doc */
340     div#google_footer {
341       flow: static(footer, start);
342     }
343
344     span.google_pagenumber {
345       content: counter(page);
346     }
347
348     span.google_pagecount {
349       content: counter(pages);
350     }
351
352
353     callout.google_footnote {
354       
355       display: prince-footnote;
356       footnote-style-position: inside;
357       /* These styles keep the footnote from taking on the style of the text
358          surrounding the footnote marker. They can be overridden in the
359          document CSS. */
360       color: #000;
361       font-family: Verdana;
362       font-size: 10.0pt;
363       font-weight: normal;
364     }
365
366     /* Table of contents */
367     #WritelyTableOfContents a::after {
368       content: leader('.') target-counter(attr(href), page);
369     }
370
371     #WritelyTableOfContents a {
372       text-decoration: none;
373       color: black;
374     }
375   }
376
377   @page {
378     @top {
379       content: flow(header);
380     }
381     @bottom {
382       content: flow(footer);
383     }
384     @footnotes {
385       border-top: solid black thin;
386       padding-top: 8pt;
387     }
388   }
389   /* end default print css */
390  
391
392 /* custom css */
393
394
395 /* end custom css */
396
397
398
399   /* ui edited css */
400   
401   body {
402     font-family: Verdana;
403     
404     font-size: 10.0pt;
405     line-height: normal;
406     background-color: #ffffff;
407   }
408   /* end ui edited css */
409
410
411
412 /* editor CSS */
413 .editor a:visited {color: #551A8B}
414 .editor table.zeroBorder {border: 1px dotted gray}
415 .editor table.zeroBorder td {border: 1px dotted gray}
416 .editor table.zeroBorder th {border: 1px dotted gray}
417
418
419 .editor div.google_header, .editor div.google_footer {
420   border: 2px #DDDDDD dashed;
421   position: static;
422   width: 100%;
423   min-height: 2em;
424 }
425
426 .editor .misspell {background-color: yellow}
427
428 .editor .writely-comment {
429   font-size: 9pt; 
430   line-height: 1.4; 
431   padding: 1px; 
432   border: 1px dashed #C0C0C0
433 }
434
435
436 /* end editor CSS */
437 </style>
438
439
440 </head>
441
442 <body onload="DoPageLoad();"
443     
444     revision="dhkdd78p_13kvrgbnfb:273">
445
446     
447     
448     
449 <div>\r
450   <div>\r
451     <b>Geniwrapper Design Document</b>\r
452   </div>\r
453 </div>\r
454 <div>\r
455   &nbsp;\r
456 </div>\r
457 <div>\r
458   <b>1.0 High Level Overview</b>\r
459 </div>\r
460 <div>\r
461   &nbsp;\r
462 </div>\r
463 <div>\r
464   The purpose of Geniwrapper is to provide a Geni-like interface around the\r
465   existing planetlab infrastructure. The existing infrastructure consists of two\r
466   parts: planetlab central (PLC) and planetlab nodes. Geni defines three \r
467   interfaces: Registry, Slice, and Component Management.&nbsp; A part of the wrapper is co-located with PLC (it exports the Registry and Slice interfaces),\r
468   and a part of the wrapper is co-located with each node (it exports the Slice\r
469   and Management interfaces).
470 </div>\r
471 <div>\r
472   &nbsp;\r
473 </div>\r
474 <div>\r
475   Geniwrapper is comprised of the following logical modules: <i>utility\r
476   classes</i>,&nbsp;<i>plc wrapper</i>, <i>component wrapper</i>, and <i>command\r
477   line client</i>. Client-server communication uses a variant of XML-RPC called\r
478   the <i>Geni protocol</i>. Section 1 of this document presents a very brief\r
479   overview of each module. In-depth discussion occurs later.\r
480 </div>\r
481 <div>\r
482   &nbsp;\r
483 </div>\r
484 <div>\r
485   Much of this design adheres to the SFA, and as such this document avoids\r
486   duplication of the information already presented in the SFA. For example, the\r
487   description of privileges, which operations are allowed by a specific\r
488   privileges, and how privileges are assigned to principals is described fully\r
489   in the SFA and is therefore not duplicated here.\r
490 </div>\r
491 <div>\r
492   &nbsp;\r
493 </div>\r
494 <div>\r
495   NOTE: <b>API documentation</b> is extracted from code comments automatically\r
496   and is maintained in separate files, one documentation file corresponding to\r
497   each python source file. An effort has been made to keep API documentation\r
498   separate from this document, so that the API documentation may be\r
499   self-maintaining as the code is updated.\r
500 </div>\r
501 <div>\r
502   &nbsp;\r
503 </div>\r
504 <div>\r
505   Geniwrapper is checked into a subversion repository at\r
506   <a href=http://svn.planetlab.org/geniwrapper>http://svn.planetlab.org/geniwrapper</a>.\r
507   [TODO: verify link]\r
508 </div>\r
509 <div>\r
510   &nbsp;\r
511 </div>\r
512 <div>\r
513   <div>\r
514     <b>1.1 Utility classes</b>\r
515   </div>\r
516   <div>\r
517     &nbsp;\r
518   </div>\r
519   <div>\r
520     Utility classes include python classes that implement certificates, GIDs,\r
521     credentials, and tickets. There are also utility classes for implementing\r
522     the server and client stubs and the security protocol. The utility modules\r
523     are designed to be generally re-usable. For example, the credential\r
524     management class may be used as part of the Geni Registry, Geni Components,\r
525     and the end-user tools that interact with Geni.\r
526   </div>\r
527   <div>\r
528     &nbsp;\r
529   </div>\r
530   <div>\r
531     The&nbsp;utility classes&nbsp;are located in the\r
532     <i>util</i>&nbsp;subdirectory.\r
533   </div>\r
534 </div>\r
535 <div>\r
536   &nbsp;\r
537 </div>\r
538 <div>\r
539   <b>1.2&nbsp;PLC wrapper</b>\r
540 </div>\r
541 <div>\r
542   &nbsp;\r
543 </div>\r
544 <div>\r
545   The&nbsp;plc wrapper is intended to be colocated with PLC. All communication\r
546   between the&nbsp;plc wrapper and PLC uses the PLCAPI interface and as such,\r
547   the&nbsp;plc wrapper can be run on a separate machine for ease of development.\r
548   In addition to the Geni registry operations (register, update, ...),\r
549   the&nbsp;plc wrapper also implements slice operations, such as GetTicket.\r
550 </div>\r
551 <div>\r
552   &nbsp;\r
553 </div>\r
554 <div>\r
555   The&nbsp;plc wrapper is located in the&nbsp;<i>plc</i> subdirectory.\r
556 </div>\r
557 <div>\r
558   &nbsp;\r
559 </div>\r
560 <div>\r
561   TODO: Most of the slice interface is yet to be implemented in&nbsp;plc wrapper.\r
562 </div>\r
563 <div>\r
564   &nbsp;\r
565 </div>\r
566 <div>\r
567   <b>1.3&nbsp;The component wrapper</b>\r
568 </div>\r
569 <div>\r
570   &nbsp;\r
571 </div>\r
572 <div>\r
573   The component wrapper is located on planetlab nodes. It implements\r
574   the&nbsp;slice interface, and the component management interface. Due to SFA\r
575   engineering decisions, some&nbsp;slice operations (i.e. GetTicket) are\r
576   not supported in the&nbsp;component wrapper.\r
577 </div>\r
578 <div>\r
579   &nbsp;\r
580 </div>\r
581 <div>\r
582   The component wrapper is located in the <i>component</i> subdirectory.\r
583 </div>\r
584 <div>\r
585   &nbsp;\r
586 </div>\r
587 <div>\r
588   <b>1.4 Command line client</b>\r
589 </div>\r
590 <div>\r
591   &nbsp;\r
592 </div>\r
593 <div>\r
594   The command line client exports a client interface to Geni that may be used\r
595   for testing and demonstration purposes. It allows easy invocation of Geni api\r
596   functions and dumps the results in a human-readable format.\r
597 </div>\r
598 <div>\r
599   &nbsp;\r
600 </div>\r
601 <div>\r
602   The command line client&nbsp;is located in the&nbsp;<i>cmdline</i>\r
603   subdirectory\r
604 </div>\r
605 <div>\r
606   &nbsp;\r
607 </div>\r
608 <div>\r
609   <b>1.5 Geni Protocol</b>\r
610 </div>\r
611 <div>\r
612   &nbsp;\r
613 </div>\r
614 <div>\r
615   The Geni protocol is based on XML-RPC. It is implemented primarily in the\r
616   geniserver.py and geniclient.py files located with the utility classes.\r
617   Modifications to the XML-RPC protocol include the following:\r
618 </div>\r
619 <div>\r
620   &nbsp;\r
621 </div>\r
622 <ol>\r
623   <li>\r
624     The transport mechanism uses HTTPS instead of HTTP.\r
625   </li>\r
626   <li>\r
627     HTTPS certificate verification is disabled so that custom Geni verification\r
628     based on GID can be done instead.\r
629   </li>\r
630   <li>\r
631     When an exception occurs on the server, verbose exception information is\r
632     sent to the client, to assist debugging efforts\r
633   </li>\r
634 </ol>\r
635 <div>\r
636   &nbsp;\r
637 </div>\r
638 <div>\r
639   Authentication:\r
640 </div>\r
641 <div>\r
642   &nbsp;\r
643 </div>\r
644 <div>\r
645   Authentication of the client by the server is done by using Credentials/GIDs.\r
646   Generally, each operation contains a credential as the first argument. This\r
647   credential includes the GID of the caller, which in turn contains the public\r
648   key of the caller. The server ensures that this public key matches the public\r
649   key that is being used to decrypt the HTTPS connection, thus ensuring the\r
650   caller must posess the private key that corresponds to the GID.\r
651 </div>\r
652 <div>\r
653   &nbsp;\r
654 </div>\r
655 <div>\r
656   Authentication of the server by the client is left as an exercise for the\r
657   client. It may be done easily by specifying the server's public key when the\r
658   client create the HTTPS connection. This presumes the client knows the public\r
659   key (or GID) of the server he is trying to connect to.\r
660 </div>\r
661 <div>\r
662   &nbsp;<br>\r
663   <b>1.6 Extending Geniwrapper to other environments</b><br>\r
664   <br>\r
665   The PLC Wrapper and Component Wrapper are implemented to work on top of the\r
666   Planetlab environment, but Geniwrapper was designed specifically to be easy to\r
667   port to other platforms or environments. The utility classes are generally\r
668   planetlab-independent, and the planetlab specific code is located in the\r
669   directories that house the PLC and Component wrappers. The utility classes\r
670   implement most of the complexity of the Geni wrapper, allowing the PLC and\r
671   Component wrappers to be relatively lightweight.<br>\r
672   <br>\r
673   For example, looking at the code for the stop_slice function implemented in\r
674   the component wrapper:<br>\r
675   <br>\r
676   &nbsp;&nbsp;&nbsp; def stop_slice(self, cred_str):<br>\r
677   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
678   self.decode_authentication(cred_str, "stopslice")<br>\r
679   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slicename =\r
680   hrn_to_pl_slicename(self.object_gid.get_hrn())<br>\r
681   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "stopslice:", slicename<br>\r
682   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; accounts.get(slicename).stop()<br>\r
683   <br>\r
684   The hrn_to_pl_slicename() function and accounts() class are planetlab-specific\r
685   and implement the actual stopping of the slice. The remaining code that\r
686   implements the Geni protocol, decodes credentials and authentication, etc., is\r
687   planetlab-independent, and could be easily used in a non-planetlab\r
688   environment.<br>\r
689   <br>\r
690 </div>\r
691 <div>\r
692   <b>2.0 Utility Classes</b>\r
693 </div>\r
694 <div>\r
695   &nbsp;\r
696 </div>\r
697 <div>\r
698   <b>2.1 Certificates and Keys (cert.py)</b>\r
699 </div>\r
700 <div>\r
701   &nbsp;\r
702 </div>\r
703 <div>\r
704   Geniwrapper uses two crypto libraries: pyOpenSSL and M2Crypto to implement the\r
705   necessary crypto functionality. Ideally just one of these libraries would be\r
706   used, but unfortunately each of these libraries is independently lacking. The\r
707   pyOpenSSL library is missing many necessary functions, and the M2Crypto\r
708   library has crashed inside of some of the functions. The design decision is to\r
709   use pyOpenSSL whenever possible as it seems more stable, and only use M2Crypto\r
710   for those functions that are not possible in pyOpenSSL.\r
711 </div>\r
712 <div>\r
713   &nbsp;\r
714 </div>\r
715 <div>\r
716   <b>2.1.1 Keys</b>\r
717 </div>\r
718 <div>\r
719   &nbsp;\r
720 </div>\r
721 <div>\r
722   Public-private key pairs are implemented by the <b>Keypair </b>class. A\r
723   Keypair object may represent both a public and private key pair, or it may\r
724   represent only a public key (this usage is consistent with OpenSSL).\r
725 </div>\r
726 <p>\r
727   &nbsp;&nbsp;&nbsp;&nbsp;\r
728 </p>\r
729 <div>\r
730   <b>2.1.2 Certificates</b>\r
731 </div>\r
732 <div>\r
733   &nbsp;\r
734 </div>\r
735 <div>\r
736   The certificate class implements a general purpose X509 certificate, making\r
737   use of the appropriate pyOpenSSL or M2Crypto abstractions. It also adds\r
738   several addition features, such as the ability to maintain a chain of parent\r
739   certificates, and storage of application-specific data.\r
740 </div>\r
741 <div>\r
742   &nbsp;\r
743 </div>\r
744 <div>\r
745   Certificates include the ability to maintain a chain of parents. Each\r
746   certificate includes a pointer to it's parent certificate. When loaded from a\r
747   file or a string, the parent chain will be automatically loaded. When saving a\r
748   certificate to a file or a string, the caller can choose whether to save the\r
749   parent certificates as well.\r
750 </div>\r
751 <div>\r
752   &nbsp;\r
753 </div>\r
754 <div>\r
755   Example creation of a certificate:\r
756 </div>\r
757 <div>\r
758   &nbsp;\r
759 </div>\r
760 <div>\r
761   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # create&nbsp;a key for an issuer<br>\r
762   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; issuerKey = Keypair(create=True)<br>\r
763   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; issuerSubject = "testissuer"\r
764 </div>\r
765 <div>\r
766   &nbsp;\r
767 </div>\r
768 <div>\r
769   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # create a key for the certificate\r
770 </div>\r
771 <div>\r
772   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; userKey = KeyPair(create=True)\r
773 </div>\r
774 <div>\r
775   &nbsp;\r
776 </div>\r
777 <div>\r
778   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # create the certificate, set the issuer, and\r
779   sign it\r
780 </div>\r
781 <div>\r
782   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cert = Certificate(subject="test")<br>\r
783   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cert.set_issuer(issuerKey, issuerSubject)\r
784 </div>\r
785 <div>\r
786   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cert.set_pubkey(userKey)<br>\r
787   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cert.sign()\r
788 </div>\r
789 <div>\r
790   &nbsp;\r
791 </div>\r
792 <div>\r
793   <b>2.1.3 Certificate Verification</b>\r
794 </div>\r
795 <div>\r
796   &nbsp;\r
797 </div>\r
798 <div>\r
799   <p>\r
800     Verification examines a chain of certificates to ensure that each parent\r
801     signs the child, and that some certificate in the chain is signed by a\r
802     trusted certificate. Verification is a basic recursion:\r
803   </p>\r
804   <pre>    if this_certificate was signed by trusted_certs:<br>        return<br>    else<br>        return verify_chain(parent, trusted_certs)</pre>\r
805 </div>\r
806 <div>\r
807   At each recursion, the parent is tested to ensure that it did sign the child.\r
808   If a parent did not sign a child, then an exception is thrown. If the bottom\r
809   of the recursion is reached and the certificate does not match a trusted root,\r
810   then an exception is thrown.\r
811 </div>\r
812 <div>\r
813   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>\r
814   <b>2.2 GIDS (gid.py)</b>\r
815 </div>\r
816 <div>\r
817   <b></b>&nbsp;\r
818 </div>\r
819 <div>\r
820   GIDs are a derivative class of certificates and as such the&nbsp;GID class\r
821   inherits all the methods of the certificate class. A&nbsp;GID includes a tuple\r
822   of the following fields:&nbsp;\r
823 </div>\r
824 <div>\r
825   &nbsp;\r
826 </div>\r
827 <div>\r
828   &nbsp;&nbsp; (uuid, hrn, public_key)\r
829 </div>\r
830 <div>\r
831   &nbsp;\r
832 </div>\r
833 <div>\r
834   UUID is a unique identifier and is created by the python uuid module (or the\r
835   utility function create_uuid() in gid.py).\r
836 </div>\r
837 <div>\r
838   &nbsp;\r
839 </div>\r
840 <div>\r
841   HRN is a human readable name. It is a dotted form similar to a backward domain\r
842   name. For example, planetlab.us.arizona.bakers.\r
843 </div>\r
844 <div>\r
845   &nbsp;\r
846 </div>\r
847 <div>\r
848   PUBLIC_KEY is the public key of the principal identified by the UUID/HRN. It\r
849   is a Keypair object as defined in the cert.py module.\r
850 </div>\r
851 <div>\r
852   &nbsp;\r
853 </div>\r
854 <div>\r
855   It is expected that there is a one-to-one pairing between UUIDs and HRN, but\r
856   it is uncertain how this would be inforced or if it needs to be enforced.\r
857 </div>\r
858 <div>\r
859   &nbsp;\r
860 </div>\r
861 <div>\r
862   <b>2.2.1 Encoding and Decoding</b>\r
863 </div>\r
864 <div>\r
865   &nbsp;\r
866 </div>\r
867 <div>\r
868   The 5 fields of the&nbsp;GID tuple are stored in the subject-alt-name field of\r
869   the X509 certificate. Two routines are included to package and unpackage these\r
870   fields: Encode() and Decode(). Encode should be called prior to signing the\r
871   GID. Decode is automatically called on demand by the various get_*()\r
872   functions.\r
873 </div>\r
874 <div>\r
875   &nbsp;\r
876 </div>\r
877 <div>\r
878   <b>2.2.2 Verification of GIDs</b>\r
879 </div>\r
880 <div>\r
881   &nbsp;\r
882 </div>\r
883 Verification first performs the checks of the certificate class (verifying that\r
884 each parent signs the child, etc). In addition, GIDs also confirm that the\r
885 parent's HRN is a prefix of the child's HRN. Verifying these prefixes prevents a\r
886 rogue authority from signing a GID for a principal that is not a member of that\r
887 authority. For example, planetlab.us.arizona cannot sign a GID for\r
888 planetlab.us.princeton.foo.\r
889 <div>\r
890   &nbsp;\r
891 </div>\r
892 <div>\r
893   <b>2.3 Credentials (credential.py)</b>\r
894 </div>\r
895 <div>\r
896   &nbsp;\r
897 </div>\r
898 <div>\r
899   Credentials are a derivative class of certificates and as such the credential\r
900   class inherits all the methods of the certificate class. A credential includes\r
901   a tuple of the following fields:\r
902 </div>\r
903 <div>\r
904   &nbsp;\r
905 </div>\r
906 <div>\r
907   &nbsp;&nbsp;&nbsp; (GIDCaller, GIDObject, LifeTime, Privileges, Delegate)\r
908 </div>\r
909 <div>\r
910   &nbsp;\r
911 </div>\r
912 <div>\r
913   GIDCaller identifies the holder of the credential. When a credential is\r
914   presented to a component, the security layer ensures that the client matches\r
915   the public key that is contained in GIDCaller.\r
916 </div>\r
917 <div>\r
918   &nbsp;\r
919 </div>\r
920 <div>\r
921   GIDObject identifies the object of the credential. This object depends upon\r
922   the type of the credential. For example, the credential for a user likely has\r
923   GIDObject == GIDCaller. Credentials for slices would include the GID of the\r
924   slice in the GIDObject field. Credentials for authorities include the GID of\r
925   the authority in the GIDObject field.\r
926 </div>\r
927 <div>\r
928   &nbsp;\r
929 </div>\r
930 <div>\r
931   LifeTime is the lifetime of the credential. Currently not implemented; expect\r
932   to implement it as an expiration date, and refuse credentials beyond that\r
933   date.\r
934 </div>\r
935 <div>\r
936   &nbsp;\r
937 </div>\r
938 <div>\r
939   Privileges is a Rights object that describes the rights that are granted to\r
940   the holder of the credential.\r
941 </div>\r
942 <div>\r
943   &nbsp;\r
944 </div>\r
945 <div>\r
946   Delegate is a True/False bit that indicates whether or not a credential can be\r
947   delegated to a different caller.\r
948 </div>\r
949 <div>\r
950   &nbsp;\r
951 </div>\r
952 <div>\r
953   <b>2.3.1 Encoding and Decoding</b>\r
954 </div>\r
955 <div>\r
956   &nbsp;\r
957 </div>\r
958 <div>\r
959   The 5 fields of the credential tuple are stored in the subject-alt-name field\r
960   of the X509 certificate. Two routines are included to package and unpackage\r
961   these fields: Encode() and Decode(). Encode should be called prior to signing\r
962   the credential. Decode is automatically called on demand by the various\r
963   get_*() functions.\r
964 </div>\r
965 <div>\r
966   &nbsp;\r
967 </div>\r
968 <div>\r
969   <b>2.3.2 Verification of Credentials</b>\r
970 </div>\r
971 <div>\r
972   &nbsp;\r
973 </div>\r
974 <div>\r
975   In addition to the checks for ordinary certificates, verification of\r
976   credentials also ensures that the delegate bit was set by each parent in the\r
977   chain. If a delegate bit was not set, then an exception is thrown.&nbsp;Each\r
978   credential must also contain a subset of the rights of the parent credential\r
979   (i.e. a user credential cannot delegate authority rights).<br>\r
980   <br>\r
981   <b>2.4 Rights (rights.py)<br>\r
982   <br>\r
983   </b>Rights are implemented by two classes:<br>\r
984   <br>\r
985   Right - represents a single right<br>\r
986   RightList - represents a list of rights A right may allow several different\r
987   operations.<br>\r
988   <br>\r
989   For example, the "info" right allows "listslices", "listcomponentresources",\r
990   etc.<br>\r
991   <br>\r
992   <b>2.5 Records (record.py)</b><br>\r
993 </div>\r
994 <div>\r
995   &nbsp;\r
996 </div>\r
997 <div>\r
998   The GeniRecord class implements a Geni Record. The GeniRecord class implements\r
999   an abstract interface for the record, so that a client may use records without\r
1000   having to understant the underlying implementation details, such as whether\r
1001   the record is realized in the registry database, a local cache, or has been\r
1002   transmitted over the wire by an interface. A GeniRecord is a tuple (Name, GID,\r
1003   Type, Info).\r
1004 </div>\r
1005 <div>\r
1006   &nbsp;\r
1007 </div>\r
1008 <div>\r
1009   &nbsp; Name specifies the HRN of the object GID is the GID of the object\r
1010 </div>\r
1011 <div>\r
1012   &nbsp;\r
1013 </div>\r
1014 <div>\r
1015   &nbsp; Type is user | sa | ma | slice | component Info is comprised of the\r
1016   following sub-fields\r
1017 </div>\r
1018 <div>\r
1019   &nbsp;\r
1020 </div>\r
1021 <div>\r
1022   &nbsp; Pointer&nbsp;is a pointer to the record in the PL database\r
1023 </div>\r
1024 <div>\r
1025   &nbsp;\r
1026 </div>\r
1027 <div>\r
1028   &nbsp; pl_info&nbsp;is planetlab-specific info (when talking to client)\r
1029 </div>\r
1030 <div>\r
1031   &nbsp;\r
1032 </div>\r
1033 <div>\r
1034   &nbsp; geni_info = geni-specific info (when talking to client)\r
1035 </div>\r
1036 <div>\r
1037   &nbsp;\r
1038 </div>\r
1039 <div>\r
1040   The pointer is interpreted depending on the type of the record. For example,\r
1041   if the type=="user", then pointer is assumed to be a person_id that indexes\r
1042   into the persons table.\r
1043 </div>\r
1044 <div>\r
1045   &nbsp;\r
1046 </div>\r
1047 <div>\r
1048   A given HRN may have more than one record, provided that the records are of\r
1049   different types. For example, planetlab.us.arizona may have both an SA and a\r
1050   MA record, but cannot have two SA records.\r
1051 </div>\r
1052 <div>\r
1053   &nbsp;\r
1054 </div>\r
1055 <div>\r
1056   <b>2.6 Tickets (geniticket.py)</b>\r
1057 </div>\r
1058 <div>\r
1059   &nbsp;\r
1060 </div>\r
1061 <div>\r
1062   Similar to GIDs and Credentials, tickets also leverage the certificate object.\r
1063 </div>\r
1064 <div>\r
1065   &nbsp;\r
1066 </div>\r
1067 <div>\r
1068   A Ticket is tuple:<br>\r
1069   &nbsp;&nbsp; (gidCaller, gidObject, attributes, rspec, delegate)<br>\r
1070   <br>\r
1071   &nbsp;&nbsp;&nbsp; gidCaller = GID of the caller performing the operation<br>\r
1072   &nbsp;&nbsp;&nbsp; gidObject = GID of the slice<br>\r
1073   &nbsp;&nbsp;&nbsp; attributes = slice attributes (keys, vref, instantiation,\r
1074   etc)<br>\r
1075   &nbsp;&nbsp;&nbsp; rspec = resources\r
1076 </div>\r
1077 <div>\r
1078   &nbsp;\r
1079 </div>\r
1080 <div>\r
1081   Tickets are created by invoking GetTicket() on the plc wrapper. The slice\r
1082   attributes and rspec are taken from the planetlab slice database and represent\r
1083   the current state of the slice. As of yet, tickets do not include any concept\r
1084   of time -- a ticket represents the state of the slice at the current time\r
1085   only.\r
1086 </div>\r
1087 <div>\r
1088   &nbsp;\r
1089 </div>\r
1090 <div>\r
1091   Tickets are redeemed by invoking RedeemTicket() on the slice interface. The\r
1092   attributes and spec are combined back into a planetlab slice record and handed\r
1093   off to the node manager.\r
1094 </div>\r
1095 <div>\r
1096   &nbsp;\r
1097 </div>\r
1098 <div>\r
1099   Tickets are signed by an authority and include parentage information that\r
1100   traces the chain of authorities back to a trusted root.\r
1101 </div>\r
1102 <div>\r
1103   &nbsp;\r
1104 </div>\r
1105 <div>\r
1106   <b>2.6.1 rspecs</b>\r
1107 </div>\r
1108 <div>\r
1109   &nbsp;\r
1110 </div>\r
1111 <div>\r
1112   The rspec is currently a dictionary of {name: value} pairs. These pairs are\r
1113   taken verbatim from the planetlab slice database.\r
1114 </div>\r
1115 <div>\r
1116   &nbsp;\r
1117 </div>\r
1118 <div>\r
1119   The general rule that is used is that things in the slice record that do not\r
1120   specifically imply a tangible resource (initscripts, keys, etc) are treated as\r
1121   attributes and things that do specify a tangible resource (disk, network, etc)\r
1122   are treated as the rspec.\r
1123 </div>\r
1124 <div>\r
1125   &nbsp;\r
1126 </div>\r
1127 <div>\r
1128   TODO: The definition of an rspec is evolving. It remains to reconcile the\r
1129   eclipse schema with Geniwrapper. Gacks is also using another rspec format,\r
1130   which may be need to be reconciled with the eclipse schema and/or geniwrapper.\r
1131 </div>\r
1132 <div>\r
1133   &nbsp;\r
1134 </div>\r
1135 <div>\r
1136   <div>\r
1137     <b>2.6.2 Encoding and Decoding</b>\r
1138   </div>\r
1139   <div>\r
1140     &nbsp;\r
1141   </div>\r
1142   <div>\r
1143     The 5 fields of the credential tuple are stored in the subject-alt-name\r
1144     field of the X509 certificate. Two routines are included to package and\r
1145     unpackage these fields: Encode() and Decode(). Encode should be called prior\r
1146     to signing the ticket. Decode is automatically called on demand by the\r
1147     various get_*() functions.\r
1148   </div>\r
1149   <div>\r
1150     &nbsp;\r
1151   </div>\r
1152   <div>\r
1153     <b>2.6.3 Verification of Tickets</b>\r
1154   </div>\r
1155   <div>\r
1156     &nbsp;\r
1157   </div>\r
1158   <div>\r
1159     Verification uses the standard parentage verification provided by the\r
1160     certificate class. Specifically, each certificate is signed by a parent, and\r
1161     some certificate must resolve to the trusted root set that is specified on\r
1162     the component.\r
1163   </div>\r
1164   <div>\r
1165     &nbsp;\r
1166   </div>\r
1167   <div>\r
1168     Unlike credentials and GIDs, the parent of a ticket may be a degenerate\r
1169     ticket that does not include the full 5-tuple (caller, object, attributes,\r
1170     rspec, delegate). In such a case, the parent is just a placeholder in the\r
1171     chain of authority used to convey the parentage information.\r
1172   </div>\r
1173   <div>\r
1174     &nbsp;\r
1175   </div>\r
1176   <div>\r
1177     Delegation of tickets is not something that is discussed in the SFA, but it\r
1178     is supported in the ticket class and may be a useful feature. For example,\r
1179     Alice may hold a ticket for a particular component, and delegate that ticket\r
1180     to Bob. Bob could then instantiate a slice for Alice. This may be one way to\r
1181     implement a slice manager.<br>\r
1182     <br>\r
1183     <b>2.7 Hierarchy of Authorities (hierarchy.py)</b><br>\r
1184     <br>\r
1185     This module implements a hierarchy of authorities and performs a similar\r
1186     function as the "tree" module of the original geniwrapper prototype. An HRN\r
1187     is assumed to be a string of authorities separated by dots. For example,\r
1188     "planetlab.us.arizona.bakers". Each component of the HRN is a different\r
1189     authority, with the last component being a leaf in the tree. Each authority\r
1190     is stored in a subdirectory on the registry.<br>\r
1191     <br>\r
1192     Inside this subdirectory are several files:<br>\r
1193     *.GID - GID file<br>\r
1194     *.PKEY - private key file<br>\r
1195     *.DBINFO - database info<br>\r
1196     <br>\r
1197     The hierarchy class can be used to create GIDs, Credentials, and Tickets for\r
1198     a given authority.\r
1199   </div>\r
1200 </div>\r
1201 <div>\r
1202   &nbsp;\r
1203 </div>\r
1204 <div>\r
1205   The default behavior is that all authorities contained in the hierarchy will\r
1206   be located together in a single physical registry. However, this is not\r
1207   strictly necessary. The *.DBINFO files contain the database information for an\r
1208   authority and can easily be configured to point to other machines. How an\r
1209   authority would cause the DBINFO files to be installed in the correct places\r
1210   is left as a separate exercise, possibly via an out-of-band management\r
1211   interface or a web page.\r
1212 </div>\r
1213 <div>\r
1214   <br>\r
1215   <b>2.8 Configuration Information (config.py)</b><br>\r
1216   <br>\r
1217   This module holds configuration parameters for geniwrapper. There are two main\r
1218   pieces of information that are used: the database connection and the PLCAPI\r
1219   connection.<br>\r
1220   <br>\r
1221   Geniwrapper uses a MYSQL database to store records. This database may be\r
1222   co-located with the PLC database, or it may be a separate database. The\r
1223   following parameters define the connection to the database. Note that\r
1224   Geniwrapper does not access any of the PLC databases directly via a mysql\r
1225   connection; All PLC databases are accessed via PLCAPI.<br>\r
1226 </div>\r
1227 <p>\r
1228   Geniwrapper uses a PLCAPI connection to perform operations on the registry,\r
1229   such as creating and deleting slices. This connection requires an account on\r
1230   the PLC server with full administrator access. The Url parameter controls\r
1231   whether the connection uses PLCAPI directly (i.e. Geniwrapper is located on\r
1232   the same machine as PLC), or uses a XMLRPC connection to the PLC machine. If\r
1233   you wish to use the API directly, then remove the Url field from the\r
1234   dictionary.\r
1235 </p>\r
1236 <div>\r
1237   <br>\r
1238   <b>2.8.1 Database Configuration</b>\r
1239 </div>\r
1240 <div>\r
1241   &nbsp;\r
1242 </div>\r
1243 <div>\r
1244   Below is an example database configuration from config.py:\r
1245 </div>\r
1246 <div>\r
1247   &nbsp;\r
1248 </div>\r
1249 <div>\r
1250   def get_default_dbinfo():<br>\r
1251   &nbsp;&nbsp;&nbsp; dbinfo={}<br>\r
1252   &nbsp;&nbsp;&nbsp; dbinfo['dbname'] = 'planetlab4'<br>\r
1253   &nbsp;&nbsp;&nbsp; dbinfo['address'] = 'localhost'<br>\r
1254   &nbsp;&nbsp;&nbsp; dbinfo['port'] = 5432<br>\r
1255   &nbsp;&nbsp;&nbsp; dbinfo['user'] = 'pgsqluser'<br>\r
1256   &nbsp;&nbsp;&nbsp; dbinfo['password'] = '4c77b272-c892-4bdf-a833-dddeeee1a2ed'\r
1257 </div>\r
1258 <div>\r
1259   &nbsp;&nbsp;&nbsp; return dbinfo\r
1260 </div>\r
1261 <div>\r
1262   &nbsp;\r
1263 </div>\r
1264 <div>\r
1265   This identifies several important pieces of the database configuration. The\r
1266   name specifies the database name as used by pgsql. The address is the hostname\r
1267   (or ip-address) of the machine that is hosting the database. It is most likely\r
1268   the local machine. Port specifies the socket port where the pgsql is\r
1269   listening. The user and password authenticate Geniwrapper to the pgsql\r
1270   database. In this example, an existing PLC database was used. This is not\r
1271   strictly necessary as only Geni-specific information is stored in this\r
1272   database. A separate database could be used, on a separate machine than PLC if\r
1273   desired.\r
1274 </div>\r
1275 <div>\r
1276   &nbsp;\r
1277 </div>\r
1278 <div>\r
1279   <b>2.8.2 PLCAPI Configuration</b>\r
1280 </div>\r
1281 <div>\r
1282   &nbsp;\r
1283 </div>\r
1284 <div>\r
1285   Blow is an example PLCAPI configuration from config.py:\r
1286 </div>\r
1287 <div>\r
1288   &nbsp;\r
1289 </div>\r
1290 <div>\r
1291   def get_pl_auth():<br>\r
1292   &nbsp;&nbsp;&nbsp; pl_auth = {'Username':\r
1293   <a href=mailto:%27root@198.0.0.132%27>'root@198.0.0.132'</a>,<br>\r
1294   &nbsp;&nbsp;&nbsp; 'AuthMethod': 'password',<br>\r
1295   &nbsp;&nbsp;&nbsp; 'AuthString':&nbsp; 'root',<br>\r
1296   &nbsp;&nbsp;&nbsp; "Url":\r
1297   "<a href=https://localhost/PLCAPI/>https://localhost:443/PLCAPI/</a>"<br>\r
1298   &nbsp;&nbsp;&nbsp; }\r
1299 </div>\r
1300 <div>\r
1301   &nbsp;&nbsp;&nbsp; return pl_auth\r
1302 </div>\r
1303 <div>\r
1304   &nbsp;\r
1305 </div>\r
1306 <div>\r
1307   The PLCAPI configuration tells Geniwrapper how to connect to PLC. There are\r
1308   two options: a local connection or a remote connection. If the Url field is\r
1309   defined, then a remote connection is assumed, and Geniwrapper will attempt to\r
1310   connect via XMLRPC to a remote PLCAPI server. If the Url field is not defined,\r
1311   then Geniwrapper will assume that PYTHONPATH includes the relevant PLCAPI\r
1312   classes to use PLCAPI directly.\r
1313 </div>\r
1314 <div>\r
1315   &nbsp;\r
1316 </div>\r
1317 <div>\r
1318   Username specifies the name of the PLCAPI user. It is suggested that a user\r
1319   with full administrative authority be allowed. Otherwise, Geniwrapper will be\r
1320   unable to lookup public keys and other information that PLC does not make\r
1321   available publicly. Administrative permission is also required to create PLC\r
1322   sites, users, etc. Authmethod and AuthString specify the password require to\r
1323   use this account.\r
1324 </div>\r
1325 <div>\r
1326   &nbsp;\r
1327 </div>\r
1328 <div>\r
1329   <b>2.9 GeniServer and GeniClient</b>\r
1330 </div>\r
1331 <div>\r
1332   &nbsp;\r
1333 </div>\r
1334 <div>\r
1335   Two files, geniserver.py and geniclient.py implement a basic Geni server and\r
1336   client.\r
1337 </div>\r
1338 <div>\r
1339   &nbsp;\r
1340 </div>\r
1341 <div>\r
1342   Geniserver forms the basis of any server that exports a Geni interface.\r
1343   Examples include the PLC and Component wrappers. The Geniserver class itself\r
1344   does not export any useful API functions other than a "noop" function that can\r
1345   be used to test the server interface. Descendant classes register additional\r
1346   API functions by overriding the register_function() member of the geniserver\r
1347   object.\r
1348 </div>\r
1349 <div>\r
1350   &nbsp;\r
1351 </div>\r
1352 <div>\r
1353   Geniserver provides a function, decode_authentication, that decodes\r
1354   credentials. Credentials are supplied as the first parameter to many registry\r
1355   and slice interface API functions. This function converts the credential\r
1356   string supplied by the user into a credential object, checks to see that the\r
1357   key the caller is using to encrypt the SSL connection matches the public key\r
1358   in the caller GID of the credential, checks to see that the credential allows\r
1359   the operation the caller is attempting to do, and finally verifies that the\r
1360   parentage of the credential traces back to a trusted root.\r
1361 </div>\r
1362 <div>\r
1363   &nbsp;\r
1364 </div>\r
1365 <div>\r
1366   Geniclient provides a variety of client-side stubs for invoking operations on\r
1367   Geni interfaces. These stubs convert objects into strings that may be encoded\r
1368   by XMLRPC, call the associated XMLRPC function, and convert the results back\r
1369   into objects. Use of the Geniclient class is optional, but it makes a\r
1370   convenient mechanism to execute API calls.\r
1371 </div>\r
1372 <div>\r
1373   &nbsp;\r
1374 </div>\r
1375 <div>\r
1376   <b>3.0 The&nbsp;PLC Wrapper</b>\r
1377 </div>\r
1378 <div>\r
1379   &nbsp;\r
1380 </div>\r
1381 <div>\r
1382   This wrapper implements the Registry and Slice interfaces. According to the\r
1383   SFA, the basic functionality of a registry is to map HRNs into records.\r
1384   However, because of the interactions between Geniwrapper and PLC, the registry\r
1385   does more than act as a simple database. The registry performs API calls on\r
1386   PLC that create slices, sites, users, etc., and as such may indirectly cause\r
1387   slices to be instantiated on components, because components are also linked to\r
1388   PLC.\r
1389 </div>\r
1390 <div>\r
1391   &nbsp;\r
1392 </div>\r
1393 <div>\r
1394   The mapping of Geni objects to planetlab objects is relatively\r
1395   straightforward:\r
1396 </div>\r
1397 <div>\r
1398   &nbsp;\r
1399 </div>\r
1400 <div>\r
1401   &nbsp;&nbsp;&nbsp; slice&nbsp;= slice\r
1402 </div>\r
1403 <div>\r
1404   &nbsp;&nbsp;&nbsp; user&nbsp;= person\r
1405 </div>\r
1406 <div>\r
1407   &nbsp;&nbsp;&nbsp;&nbsp;component = node\r
1408 </div>\r
1409 <div>\r
1410   &nbsp;&nbsp;&nbsp; sa = site\r
1411 </div>\r
1412 <div>\r
1413   &nbsp;&nbsp;&nbsp; ma = site\r
1414 </div>\r
1415 <div>\r
1416   &nbsp;\r
1417 </div>\r
1418 <div>\r
1419   The one part that is slightly counterintuitive is SA and MA, which both map to\r
1420   the planetlab site object. In a unified registry (a registry that serves as\r
1421   both slice and component registry), these will map to the same site record in\r
1422   the PLC database. However, there are two distinct Geni records, one&nbsp;for\r
1423   the SA and one for the MA.&nbsp;\r
1424 </div>\r
1425 <div>\r
1426   &nbsp;\r
1427 </div>\r
1428 <div>\r
1429   Registry and slice&nbsp;operations generally authenticate the&nbsp;caller by\r
1430   credential. There are a few exceptions, and the registry API&nbsp;documents\r
1431   should note those exceptions.&nbsp;\r
1432 </div>\r
1433 <div>\r
1434   &nbsp;\r
1435 </div>\r
1436 <div>\r
1437   <b>3.1&nbsp;PLC&nbsp;Wrapper&nbsp;Tools</b>\r
1438 </div>\r
1439 <div>\r
1440   &nbsp;\r
1441 </div>\r
1442 <div>\r
1443   The registry include several additional tools that are used to manage it.\r
1444   These include:\r
1445 </div>\r
1446 <div>\r
1447   &nbsp;\r
1448 </div>\r
1449 <div>\r
1450   import.py - imports existing PLC records into the registry\r
1451 </div>\r
1452 <div>\r
1453   &nbsp;\r
1454 </div>\r
1455 <div>\r
1456   nuke.py - deletes all Geni records\r
1457 </div>\r
1458 <div>\r
1459   &nbsp;\r
1460 </div>\r
1461 <div>\r
1462   <b>3.1 Bootstrapping&nbsp;the PLC Wrapper</b>\r
1463 </div>\r
1464 <div>\r
1465   &nbsp;\r
1466 </div>\r
1467 <div>\r
1468   There are several items that need to be done before starting the plc wrapper.\r
1469 </div>\r
1470 <div>\r
1471   &nbsp;\r
1472 </div>\r
1473 <div>\r
1474   1) Update util/config.py to match the parameters of your PLC installation.\r
1475 </div>\r
1476 <div>\r
1477   &nbsp;\r
1478 </div>\r
1479 <div>\r
1480   2) Import the existing planetlab database, creating the appropriate geni\r
1481   records. This is done by running the "import.py" tool.\r
1482 </div>\r
1483 <div>\r
1484   &nbsp;\r
1485 </div>\r
1486 <div>\r
1487   3) Create a "trusted_roots" directory and place the certificate of the root\r
1488   authority in that directory. Given the defaults in import.py, this certificate\r
1489   would be named "planetlab.gid". For example, mkdir trusted_roots; cp\r
1490   authorities/planetlab.gid trusted_roots/\r
1491 </div>\r
1492 <div>\r
1493   &nbsp;\r
1494 </div>\r
1495 <div>\r
1496   <b>4.0 The Component Wrapper</b>\r
1497 </div>\r
1498 <div>\r
1499   <br>\r
1500   The Geni Component Wrapper implements the Geni Slice and Component Management\r
1501   interfaces. It includes functions for redeeming tickets,\r
1502   starting/stopping/resetting/deleting slices, and management such as rebooting\r
1503   the component.\r
1504 </div>\r
1505 <div>\r
1506   &nbsp;\r
1507 </div>\r
1508 <div>\r
1509   The design of the component differs from the plc wrapper in the respect that\r
1510   the component wrapper must be run in the same domain (VM) as the NM for the\r
1511   node it is responsible for. That is, the component wrapper directly calls\r
1512   the local node manager.\r
1513 </div>\r
1514 <div>\r
1515   &nbsp;\r
1516 </div>\r
1517 <div>\r
1518   <b>4.1 Component Authentication of Credentials</b>\r
1519 </div>\r
1520 <div>\r
1521   &nbsp;\r
1522 </div>\r
1523 <div>\r
1524   The component authenticates credentials the same way that the plc wrapper\r
1525   does. Specifically, there is a directory of trusted_root certificates (or\r
1526   GIDs) on the component. Any credential presented to the component must include\r
1527   in it's parentage some certificate in the set of trusted roots. Otherwise, and\r
1528   exception is thrown.\r
1529 </div>\r
1530 <div>\r
1531   &nbsp;\r
1532 </div>\r
1533 <div>\r
1534   <b>4.2 The Ticket interface</b>\r
1535 </div>\r
1536 <div>\r
1537   &nbsp;\r
1538 </div>\r
1539 <div>\r
1540   Mainpulating tickets is split between the PLC wrapper and the Component wrapper.\r
1541   Specifically,&nbsp;the authoritative copy of planetlab state is stored on PLC and only cached on\r
1542   the components. Thus, GetTicket() is implemented by the plc wrapper, and\r
1543   RedeemTicket() is implemented by the component wrapper. Attempting to call GetTicket()\r
1544   on a component will fail.<br>\r
1545   <br>\r
1546   InstantiateSlice is not implemented, as that operation is a combination of\r
1547   GetTicket/RedeemTicket and would therefore span the PLC and Component\r
1548   wrappers.<br>\r
1549 </div>\r
1550 <div>\r
1551   &nbsp;\r
1552 </div>\r
1553 <div>\r
1554   <b>4.3 Sliver Credentials</b>\r
1555 </div>\r
1556 <div>\r
1557   &nbsp;\r
1558 </div>\r
1559 <div>\r
1560   A recent Geni Architecture call mentioned the need for sliver credentials. A\r
1561   sliver credential would be identical to a slice credential, but would 1) only\r
1562   be redeemable on a particular component, and 2) would resolve to a\r
1563   trusted_root unique to that component (likely the component's GID\r
1564   certificate). Sliver credentials would be returned by the RedeemTicket call\r
1565   and would give the caller the permission required to start and stop the\r
1566   sliver, etc.\r
1567 </div>\r
1568 <div>\r
1569   &nbsp;\r
1570 </div>\r
1571 <div>\r
1572   Sliver credentials are not yet implemented, but their implementation would be\r
1573   straightforward.\r
1574 </div>\r
1575 <div>\r
1576   &nbsp;\r
1577 </div>\r
1578 <div>\r
1579   <b>4.4 Bootstrapping the Component Wrapper</b>\r
1580 </div>\r
1581 <div>\r
1582   &nbsp;\r
1583 </div>\r
1584 <div>\r
1585   The first step is to install some required libraries on the component. These\r
1586   include the m2crypto and pyopenssl libraries. Installing the actual RPMs for\r
1587   these libaries on a running component proved difficult due to additional\r
1588   support packages that require installation (python-devel, etc). For\r
1589   development purposes, it was sufficient to copy the installed/compiled version\r
1590   of the libraries from the development machine to the component.\r
1591 </div>\r
1592 <div>\r
1593   &nbsp;\r
1594 </div>\r
1595 <div>\r
1596   The&nbsp;second step is to copy the files required by the component wrapper to\r
1597   the node manager. They are copied to the /usr/share/Nodemanager directory. A\r
1598   list of the files is contained in the copynode.sh script in the component\r
1599   subdirectory.\r
1600 </div>\r
1601 <div>\r
1602   &nbsp;\r
1603 </div>\r
1604 <div>\r
1605   The third step is to copy the trusted root certificates to the component. They\r
1606   are stored in /usr/share/Nodemanager/trusted_roots. This should include the\r
1607   certificate for the registry.\r
1608 </div>\r
1609 <div>\r
1610   &nbsp;\r
1611 </div>\r
1612 <div>\r
1613   The&nbsp;fourth step is to start the component manager. This is done by\r
1614   connecting to the component via SSH and running\r
1615   /usr/share/Nodemanager/component.py.\r
1616 </div>\r
1617 <div>\r
1618   <br>\r
1619   In a production environment, all of these steps would be integrated into the\r
1620   DVD boot image for the planetlab node.\r
1621 </div>\r
1622 <div>\r
1623   &nbsp;\r
1624 </div>\r
1625 <div>\r
1626   <b>5.0 Command-Line Interface</b>\r
1627 </div>\r
1628 <div>\r
1629   &nbsp;\r
1630 </div>\r
1631 <div>\r
1632   A command-line interface is provided that allows a user to interact with the\r
1633   Geni Registry and Component. This command line interface is located in the\r
1634   cmdline directory and can be invoked by running genicli.py. Specifying\r
1635   "genicli.py help" will display a list of available commands.\r
1636 </div>\r
1637 <div>\r
1638   &nbsp;\r
1639 </div>\r
1640 <div>\r
1641   <b>5.1 Examples</b>\r
1642 </div>\r
1643 <div>\r
1644   &nbsp;\r
1645 </div>\r
1646 <div>\r
1647   Several examples of using the CLI are presented in the form of shell scripts\r
1648   in the cmdline directory. These scripts demonstrate creating slices,\r
1649   authorities, users, nodes, and getting tickets and redeeming tickets. Rather\r
1650   than duplicating all of those examples here, a few short examples are\r
1651   presented below.\r
1652 </div>\r
1653 <div>\r
1654   &nbsp;\r
1655 </div>\r
1656 <div>\r
1657   <b>5.1.1 Getting a Credential</b>\r
1658 </div>\r
1659 <div>\r
1660   &nbsp;\r
1661 </div>\r
1662 <div>\r
1663   python ./genicli.py --username&nbsp;root --credfile None --outfile test.cred\r
1664   getCredential user planetlab.us.pl.account_test\r
1665 </div>\r
1666 <div>\r
1667   &nbsp;\r
1668 </div>\r
1669 <div>\r
1670   The credential for planetlab.us.pl.account_test is retrieved and stored in the\r
1671   local file test.cred. The private ket test.pkey is used when opening the\r
1672   XMLRPC connection and authenticates the client. test.pkey must match the\r
1673   public key that is in the GID for the user record for\r
1674   planetlab.us.pl.account_test.\r
1675 </div>\r
1676 <div>\r
1677   &nbsp;\r
1678 </div>\r
1679 <div>\r
1680   Sample output: (in human-readable summary)\r
1681 </div>\r
1682 <div>\r
1683   &nbsp;\r
1684 </div>\r
1685 <div>\r
1686   CREDENTIAL planetlab.us.pl.account_test<br>\r
1687   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; privs: refresh,resolve,info<br>\r
1688   &nbsp; gidCaller:<br>\r
1689   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn:\r
1690   planetlab.us.pl.account_test<br>\r
1691   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid:\r
1692   276262316202422735940395896620385479122<br>\r
1693   &nbsp; gidObject:<br>\r
1694   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn:\r
1695   planetlab.us.pl.account_test<br>\r
1696   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid:\r
1697   276262316202422735940395896620385479122<br>\r
1698   &nbsp;&nbsp; delegate: False\r
1699 </div>\r
1700 <div>\r
1701   &nbsp;\r
1702 </div>\r
1703 <div>\r
1704   &nbsp;\r
1705 </div>\r
1706 <div>\r
1707   <b>5.1.2 Resolving a record</b>\r
1708 </div>\r
1709 <div>\r
1710   &nbsp;\r
1711 </div>\r
1712 <div>\r
1713   python ./genicli.py --username test resolve planetlab.us.pl.account_test\r
1714 </div>\r
1715 <div>\r
1716   &nbsp;\r
1717 </div>\r
1718 <div>\r
1719   The record for planetlab.us.pl.account_test is retrieved and printed to\r
1720   stdout. The credential used comes from the local file test.cred.\r
1721 </div>\r
1722 <div>\r
1723   &nbsp;\r
1724 </div>\r
1725 <div>\r
1726   Sample output: (in human-readable summary)\r
1727 </div>\r
1728 <div>\r
1729   &nbsp;\r
1730 </div>\r
1731 <div>\r
1732   RECORD planetlab.us.pl.account_test<br>\r
1733   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn: planetlab.us.pl.account_test<br>\r
1734   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type: user<br>\r
1735   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gid:<br>\r
1736   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn:\r
1737   planetlab.us.pl.account_test<br>\r
1738   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid:\r
1739   276262316202422735940395896620385479122<br>\r
1740   &nbsp;&nbsp;&nbsp; pointer: 6<br>\r
1741   &nbsp; geni_info:<br>\r
1742   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; email :\r
1743   <a href=mailto:test@test.com>test@test.com</a><br>\r
1744   &nbsp;&nbsp;&nbsp; pl_info:<br>\r
1745   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bio : None<br>\r
1746   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first_name : test<br>\r
1747   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; last_name : account<br>\r
1748   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; last_updated : 1222497672<br>\r
1749   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid : None<br>\r
1750   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; roles : ['user']<br>\r
1751   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title : None<br>\r
1752   &nbsp;&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url : None<br>\r
1753   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key_ids : [1]<br>\r
1754   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enabled : True<br>\r
1755   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_ids : [24]<br>\r
1756   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phone : None<br>\r
1757   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; peer_person_id : None<br>\r
1758   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; role_ids : [30]<br>\r
1759   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person_id : 6<br>\r
1760   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; date_created : 1219083140<br>\r
1761   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; site_ids : [1]<br>\r
1762   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; peer_id : None<br>\r
1763   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; email :\r
1764   <a href=mailto:test@test.com>test@test.com</a>\r
1765 </div>\r
1766 <div>\r
1767   &nbsp;\r
1768 </div>\r
1769 <div>\r
1770   <b>5.1.3 Updating a record</b>\r
1771 </div>\r
1772 <div>\r
1773   &nbsp;\r
1774 </div>\r
1775 <div>\r
1776   python ./genicli.py --username test update user planetlab.us.pl.account_test\r
1777 </div>\r
1778 <div>\r
1779   &nbsp;\r
1780 </div>\r
1781 <div>\r
1782   The record for planetlab.us.pl.account_test is updated. The credential used\r
1783   comes from the local file test.cred. No changes are specified, so the only\r
1784   thing that should be updated is the expiration time.\r
1785 </div>\r
1786 <div>\r
1787   &nbsp;\r
1788 </div>\r
1789 <div>\r
1790   <b>5.1.4 Resolving an authority</b>\r
1791 </div>\r
1792 <div>\r
1793   &nbsp;\r
1794 </div>\r
1795 <div>\r
1796   An authority is an example of an HRN that might resolve to two different\r
1797   records, an SA and a MA record.\r
1798 </div>\r
1799 <div>\r
1800   &nbsp;\r
1801 </div>\r
1802 <div>\r
1803   python ./genicli.py --username test resolve planetlab.us.pl\r
1804 </div>\r
1805 <div>\r
1806   &nbsp;\r
1807 </div>\r
1808 <div>\r
1809   Sample Output: (in human readable summary)\r
1810 </div>\r
1811 <div>\r
1812   &nbsp;\r
1813 </div>\r
1814 <div>\r
1815   RECORD planetlab.us.pl<br>\r
1816   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn: planetlab.us.pl<br>\r
1817   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type: sa<br>\r
1818   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gid:<br>\r
1819   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn: planetlab.us.pl<br>\r
1820   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid:\r
1821   294786197975089072547582920862317666209<br>\r
1822   &nbsp;&nbsp;&nbsp; pointer: 1<br>\r
1823   &nbsp; geni_info:<br>\r
1824   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pi :\r
1825   ['planetlab.us.pl.Administrator_Default']<br>\r
1826   &nbsp;&nbsp;&nbsp; pl_info:<br>\r
1827   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; last_updated : 1224136003<br>\r
1828   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node_ids : [1]<br>\r
1829   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; site_id : 1<br>\r
1830   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pcu_ids : []<br>\r
1831   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_slices : 100<br>\r
1832   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext_consortium_id : None<br>\r
1833   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; peer_site_id : None<br>\r
1834   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; abbreviated_name : plctest<br>\r
1835   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid :\r
1836   230749975723590978208303655640765327534<br>\r
1837   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person_ids : [2, 4, 6]<br>\r
1838   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_ids : [24, 1, 2]<br>\r
1839   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latitude : None<br>\r
1840   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; peer_id : None<br>\r
1841   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_slivers : 1000<br>\r
1842   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is_public : False<br>\r
1843   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address_ids : []<br>\r
1844   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name : plctest Central<br>\r
1845   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url :\r
1846   <a href=http://198.0.0.132/>http://198.0.0.132/</a><br>\r
1847   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enabled : True<br>\r
1848   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; longitude : None<br>\r
1849   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; login_base : pl<br>\r
1850   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; date_created : 1209428329<br>\r
1851   RESULT:<br>\r
1852   RECORD planetlab.us.pl<br>\r
1853   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn: planetlab.us.pl<br>\r
1854   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type: ma<br>\r
1855   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gid:<br>\r
1856   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hrn: planetlab.us.pl<br>\r
1857   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid:\r
1858   294786197975089072547582920862317666209<br>\r
1859   &nbsp;&nbsp;&nbsp; pointer: 1<br>\r
1860   &nbsp; geni_info:<br>\r
1861   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operator : []<br>\r
1862   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; owner :\r
1863   ['planetlab.us.pl.Administrator_Default']<br>\r
1864   &nbsp;&nbsp;&nbsp; pl_info:<br>\r
1865   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; last_updated : 1224136003<br>\r
1866   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node_ids : [1]<br>\r
1867   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; site_id : 1<br>\r
1868   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pcu_ids : []<br>\r
1869   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_slices : 100<br>\r
1870   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext_consortium_id : None<br>\r
1871   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; peer_site_id : None<br>\r
1872   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; abbreviated_name : plctest<br>\r
1873   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uuid :\r
1874   230749975723590978208303655640765327534<br>\r
1875   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; person_ids : [2, 4, 6]<br>\r
1876   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_ids : [24, 1, 2]<br>\r
1877   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; latitude : None<br>\r
1878   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; peer_id : None<br>\r
1879   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_slivers : 1000<br>\r
1880   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is_public : False<br>\r
1881   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address_ids : []<br>\r
1882   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name : plctest Central<br>\r
1883   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url :\r
1884   <a href=http://198.0.0.132/>http://198.0.0.132/</a><br>\r
1885   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enabled : True<br>\r
1886   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; longitude : None<br>\r
1887   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; login_base : pl<br>\r
1888   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; date_created : 1209428329\r
1889 </div>\r
1890 <br>