forked from shaba/openuds
216 lines
10 KiB
HTML
216 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
||
<title>UDS Modules Samples — UDS 1.0 documentation</title>
|
||
|
||
<link rel="stylesheet" href="../../_static/sphinxdoc.css" type="text/css" />
|
||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||
|
||
<script type="text/javascript">
|
||
var DOCUMENTATION_OPTIONS = {
|
||
URL_ROOT: '../../',
|
||
VERSION: '1.0',
|
||
COLLAPSE_INDEX: false,
|
||
FILE_SUFFIX: '.html',
|
||
HAS_SOURCE: true
|
||
};
|
||
</script>
|
||
<script type="text/javascript" src="../../_static/jquery.js"></script>
|
||
<script type="text/javascript" src="../../_static/underscore.js"></script>
|
||
<script type="text/javascript" src="../../_static/doctools.js"></script>
|
||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||
<link rel="top" title="UDS 1.0 documentation" href="../../index.html" />
|
||
<link rel="up" title="UDS’s core API" href="../../api/index.html" />
|
||
<link rel="next" title="Needs for a service package" href="services/whatisneeded.html" />
|
||
<link rel="prev" title="Authenticator Interface" href="../../api/modules/auths/Authenticator.html" />
|
||
</head>
|
||
<body>
|
||
<div class="related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="services/whatisneeded.html" title="Needs for a service package"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="../../api/modules/auths/Authenticator.html" title="Authenticator Interface"
|
||
accesskey="P">previous</a> |</li>
|
||
<li><a href="../../index.html">UDS 1.0 documentation</a> »</li>
|
||
<li><a href="../../api/index.html" accesskey="U">UDS’s core API</a> »</li>
|
||
</ul>
|
||
</div>
|
||
<div class="sphinxsidebar">
|
||
<div class="sphinxsidebarwrapper">
|
||
<h3><a href="../../index.html">Table Of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">UDS Modules Samples</a><ul>
|
||
<li><a class="reference internal" href="#service-sample">Service Sample</a></li>
|
||
<li><a class="reference internal" href="#authenticator-sample">Authenticator Sample</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="../../api/modules/auths/Authenticator.html"
|
||
title="previous chapter">Authenticator Interface</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="services/whatisneeded.html"
|
||
title="next chapter">Needs for a service package</a></p>
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="../../_sources/development/samples/samples.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
<div id="searchbox" style="display: none">
|
||
<h3>Quick search</h3>
|
||
<form class="search" action="../../search.html" method="get">
|
||
<input type="text" name="q" />
|
||
<input type="submit" value="Go" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
<p class="searchtip" style="font-size: 90%">
|
||
Enter search terms or a module, class or function name.
|
||
</p>
|
||
</div>
|
||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body">
|
||
|
||
<div class="section" id="uds-modules-samples">
|
||
<h1>UDS Modules Samples<a class="headerlink" href="#uds-modules-samples" title="Permalink to this headline">¶</a></h1>
|
||
<p>In this section we cover basic samples of the different kind of mudules supported
|
||
by UDS.</p>
|
||
<p>UDS is designed in a modular way, meaning this that it has a core that allows
|
||
a number of modules to get plugged inside the whole system.</p>
|
||
<p>This modules are:</p>
|
||
<blockquote>
|
||
<div><ul class="simple">
|
||
<li>Services, including all stuff around them.</li>
|
||
<li>Transports</li>
|
||
<li>OS Managers</li>
|
||
<li>Authenticators</li>
|
||
</ul>
|
||
</div></blockquote>
|
||
<p>This secion will try to give sample of every module, what it must do and how this
|
||
must be done.</p>
|
||
<div class="section" id="service-sample">
|
||
<h2>Service Sample<a class="headerlink" href="#service-sample" title="Permalink to this headline">¶</a></h2>
|
||
<p>A service is composed of several classes. This classes depends on how the service works.</p>
|
||
<p>This are:</p>
|
||
<blockquote>
|
||
<div><ul>
|
||
<li><p class="first"><em>Provider</em>, that is simply the “root” where services
|
||
descent, so we can configure just one part of the service parameters and rest
|
||
of them at service level.</p>
|
||
<p>One sample of provider is a virtualization server, such as oVirt, Open Nebula, or
|
||
others like it. We can keep info about server at provider level, and info about
|
||
what we need in an specific service at service level.</p>
|
||
</li>
|
||
<li><p class="first"><em>Service</em>, that is a service definition, that must be deployed at a later stage
|
||
to offer something to the users.</p>
|
||
<p>Following our previous sample, if provider was an oVirt server, a service can
|
||
be a Virtual Machine cloned COW.</p>
|
||
</li>
|
||
<li><p class="first"><em>Publication</em>, This class is optional. If service declares that needs a
|
||
publication for deployment of user instance, this class implements exactly
|
||
that, the publication for that service. Publications are in fact a way of
|
||
allowing services to prepare something in a stage prior to creating the
|
||
user consumable services.</p>
|
||
<p>Following our previous sample, if provider was an oVirt Server and the service
|
||
was a Virtual Machine cloned for Cow, the poblication can be a full clone of
|
||
the service machine for making COWS from this one.</p>
|
||
</li>
|
||
<li><p class="first"><em>DeployedService</em>, This class is the user consumed service itself. After a
|
||
service is created, it must be deployed, and deploy will mean that there will
|
||
be “instances” of that service (User Deployments) that will be consumed by
|
||
users.</p>
|
||
<p>Following our previous sample, if the publication was a full copy machine,
|
||
an deployed service can be a machine in COW format using as base that
|
||
machine.</p>
|
||
</li>
|
||
</ul>
|
||
</div></blockquote>
|
||
<p>From theese, the only not really needed is Publication. Publication will only be
|
||
needed whenever a service needs a “preparation” before creating the user consumable
|
||
deployed services. For a service to be usable, we will need the full tree, meaning
|
||
this that we will provide all controllers (Provider, service or services, publication
|
||
or publications, deployed service or deployed services.).</p>
|
||
<p>All class belonging to a service must be grouped under the same package, and we
|
||
well need to register this package for the system to recognize it as service.</p>
|
||
<p>For this, we must register the Provider, that has references to rest of items.</p>
|
||
<p>Provider declares which services it provides. Services declares which publication
|
||
and deployed service it needs. Provider can declare multiples services it offers,
|
||
but services has at most one publication and exatly one deployed service.</p>
|
||
<p>So, by registering the Provider, we register the whole tree provided by de package.</p>
|
||
<p>Here you can find samples of every class needed for creating a new package of
|
||
services.</p>
|
||
<div class="toctree-wrapper compound">
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="services/whatisneeded.html">Needs for a service package</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="services/Provider.html">Sample Service Provider</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="services/Service.html">Sample service</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="services/Publication.html">Sample publication</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="services/DeployedServiceOne.html">Sample User Deployment One</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="services/DeployedServiceTwo.html">Sample User Deployment Two</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="authenticator-sample">
|
||
<h2>Authenticator Sample<a class="headerlink" href="#authenticator-sample" title="Permalink to this headline">¶</a></h2>
|
||
<p>An authenticator is composed of a single class, derived from <a class="reference internal" href="../../api/modules/auths/Authenticator.html#uds.core.auths.Authenticator" title="uds.core.auths.Authenticator"><tt class="xref py py-class docutils literal"><span class="pre">uds.core.auths.Authenticator</span></tt></a>.</p>
|
||
<p>Here you can find a sample of an authenticator.</p>
|
||
<div class="toctree-wrapper compound">
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="auths/Authenticator.html">Sample Authenticator</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="services/whatisneeded.html" title="Needs for a service package"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="../../api/modules/auths/Authenticator.html" title="Authenticator Interface"
|
||
>previous</a> |</li>
|
||
<li><a href="../../index.html">UDS 1.0 documentation</a> »</li>
|
||
<li><a href="../../api/index.html" >UDS’s core API</a> »</li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer">
|
||
© Copyright 2012, Virtual Cable S.L.U..
|
||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
|
||
</div>
|
||
</body>
|
||
</html> |