Merge branch 'master' of github.com:open-cloud/xos
diff --git a/xos/observers/hello_world/run.sh b/xos/observers/hello_world/run.sh
index f77d751..1107a7a 100755
--- a/xos/observers/hello_world/run.sh
+++ b/xos/observers/hello_world/run.sh
@@ -3,4 +3,4 @@
 #fi
 
 export XOS_DIR=/opt/xos
-python hpc-observer.py  -C $XOS_DIR/observers/hpc/hpc_observer_config
+python helloworld-observer.py  -C $XOS_DIR/observers/hello_world/helloworld_config
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index b929eda..81d1333 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -55,16 +55,20 @@
             kind:
                 type: string
                 default: generic
+                description: Kind of subscriber
             service_specific_id:
                 type: string
-                required: false)
+                required: false
+                description: Service specific ID, opaque to XOS but meaningful to service)
 define(xos_base_tenant_props,
             kind:
                 type: string
                 default: generic
+                description: Kind of tenant
             service_specific_id:
                 type: string
-                required: false)
+                required: false
+                description: Service specific ID, opaque to XOS but meaningful to service)
 
 # end m4 macros
 #
@@ -157,6 +161,9 @@
             CORD: User. The CORD user represents an individual device beloning
             to the CORD Subscriber. Each device may have its own parental
             controls.
+        capabilities:
+            device:
+                type: tosca.capabilities.xos.Device
         properties:
             level:
                 type: string
@@ -257,7 +264,7 @@
             topology_kind:
                 type: string
                 default: BigSwitch
-                descrption: Describes the topology of the network.
+                description: Describes the topology of the network.
             controller_kind:
                 type: string
                 required: false
@@ -269,7 +276,8 @@
           # using derived_from.
           derived_from: tosca.nodes.Root
           description: >

-            The TOSCA Network node represents a simple, logical network service.

+            This is a variant of the TOSCA Network object that includes additional

+            XOS-specific properties.

           properties:

             ip_version:

               type: integer

@@ -468,7 +476,7 @@
         description: >
             An XOS Slice. A slice is a collection of instances that share
             common attributes.
-        capability:
+        capabilities:
             slice:
                 type: tosca.capabilities.xos.Slice
         properties:
@@ -539,6 +547,7 @@
 
     tosca.relationships.ConnectsToSlice:
         derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Slice ]
 
     #    tosca.relationships.OwnsNetwork:
     #        derived_from: tosca.relationships.Root
@@ -550,25 +559,27 @@
 
     tosca.relationships.AdminPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabilities.xos.Site ]
 
     tosca.relationships.AccessPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabilities.xos.Site ]
 
     tosca.relationships.PIPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Site ]
 
     tosca.relationships.TechPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Site ]
 
     tosca.relationships.SubscriberDevice:
         derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Subscriber ]
 
     tosca.relationships.BelongsToSubscriber:
         derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Subscriber ]
 
     tosca.capabilities.xos.Service:
         derived_from: tosca.capabilities.Root
@@ -606,6 +617,10 @@
         derived_from: tosca.capabilities.Root
         description: An XOS Subscriber
 
+    tosca.capabilities.xos.Device:
+        derived_from: tosca.capabilities.Root
+        description: A device belonging to an XOS subscriber
+
     tosca.capabilities.xos.Node:
         derived_from: tosca.capabilities.Root
         description: An XOS Node
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 2c674eb..9e25754 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -189,9 +189,11 @@
             kind:
                 type: string
                 default: generic
+                description: Kind of subscriber
             service_specific_id:
                 type: string
                 required: false
+                description: Service specific ID
 
     tosca.nodes.CORDSubscriber:
         derived_from: tosca.nodes.Root
@@ -206,9 +208,11 @@
             kind:
                 type: string
                 default: generic
+                description: Kind of subscriber
             service_specific_id:
                 type: string
                 required: false
+                description: Service specific ID
             firewall_enable:
                 type: boolean
                 default: false
@@ -232,6 +236,9 @@
             CORD: User. The CORD user represents an individual device beloning
             to the CORD Subscriber. Each device may have its own parental
             controls.
+        capabilities:
+            device:
+                type: tosca.capabilities.xos.Device
         properties:
             level:
                 type: string
@@ -251,9 +258,11 @@
             kind:
                 type: string
                 default: generic
+                description: Kind of tenant
             service_specific_id:
                 type: string
                 required: false
+                description: Service specific ID
             vlan_id:
                 type: string
                 required: false
@@ -337,7 +346,7 @@
             topology_kind:
                 type: string
                 default: BigSwitch
-                descrption: Describes the topology of the network.
+                description: Describes the topology of the network.
             controller_kind:
                 type: string
                 required: false
@@ -349,7 +358,8 @@
           # using derived_from.
           derived_from: tosca.nodes.Root
           description: >

-            The TOSCA Network node represents a simple, logical network service.

+            This is a variant of the TOSCA Network object that includes additional

+            XOS-specific properties.

           properties:

             ip_version:

               type: integer

@@ -555,7 +565,7 @@
         description: >
             An XOS Slice. A slice is a collection of instances that share
             common attributes.
-        capability:
+        capabilities:
             slice:
                 type: tosca.capabilities.xos.Slice
         properties:
@@ -626,6 +636,7 @@
 
     tosca.relationships.ConnectsToSlice:
         derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Slice ]
 
     #    tosca.relationships.OwnsNetwork:
     #        derived_from: tosca.relationships.Root
@@ -637,25 +648,27 @@
 
     tosca.relationships.AdminPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabilities.xos.Site ]
 
     tosca.relationships.AccessPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Slice, tosca.capabilities.xos.Site ]
 
     tosca.relationships.PIPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Site ]
 
     tosca.relationships.TechPrivilege:
         derived_from: tosca.relationships.Root
-        valid_target_types: [ tosca.capabiltys.xos.Site ]
+        valid_target_types: [ tosca.capabilities.xos.Site ]
 
     tosca.relationships.SubscriberDevice:
         derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Subscriber ]
 
     tosca.relationships.BelongsToSubscriber:
         derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Subscriber ]
 
     tosca.capabilities.xos.Service:
         derived_from: tosca.capabilities.Root
@@ -693,6 +706,10 @@
         derived_from: tosca.capabilities.Root
         description: An XOS Subscriber
 
+    tosca.capabilities.xos.Device:
+        derived_from: tosca.capabilities.Root
+        description: A device belonging to an XOS subscriber
+
     tosca.capabilities.xos.Node:
         derived_from: tosca.capabilities.Root
         description: An XOS Node
diff --git a/xos/tosca/definitions/TOSCA_definition_1_0.yaml b/xos/tosca/definitions/TOSCA_definition_1_0.yaml
index c21f0bc..97a8c44 100644
--- a/xos/tosca/definitions/TOSCA_definition_1_0.yaml
+++ b/xos/tosca/definitions/TOSCA_definition_1_0.yaml
@@ -1,4 +1,4 @@
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    not use this file except in compliance with the License. You may obtain
 #    a copy of the License at
 #
@@ -47,6 +47,11 @@
 
 tosca.nodes.Compute:
   derived_from: tosca.nodes.Root
+  description: >
+    The TOSCA Compute node represents one or more real or virtual processors
+    of software applications or services along with other essential local
+    resources.  Collectively, the resources the compute node represents can
+    logically be viewed as a (real or virtual) server.
   attributes:
     private_address:
       type: string
diff --git a/xos/tosca/makedocs.py b/xos/tosca/makedocs.py
index f7dc11b..6a9e959 100644
--- a/xos/tosca/makedocs.py
+++ b/xos/tosca/makedocs.py
@@ -24,8 +24,14 @@
     def __init__(self, fn="./custom_types/xos.yaml", templatedir="./doctemplates/html", templatename="toscadoctemplate.html", destfn="tosca_reference.html"):
         self.env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatedir))
 
+        self.node_types = {}
+        self.root_types = yaml.load(file("definitions/TOSCA_definition_1_0.yaml").read())
+        for x in self.root_types.keys():
+            if x in ["tosca.nodes.Compute", "tosca.nodes.network.Network"]:
+                self.node_types[x] = self.root_types[x]
+
         self.custom_types = yaml.load(file(fn).read())
-        self.node_types = self.custom_types.get("node_types")
+        self.node_types.update(self.custom_types.get("node_types"))
 
         self.destfn = destfn
         self.templatename = templatename