Jump to: navigation, search

Difference between revisions of "Satori/DiscoverySchema"

(Created page with "Placeholder for new spec")
 
Line 1: Line 1:
Placeholder for new spec
+
= Proposed New Schema for Satori Discovery =
 +
 
 +
    {
 +
        "target": "http://somedomain.com",
 +
        "created": "2014-03-29 09:08:08 +0000",
 +
        "updated": "2014-03-29 09:12:02 +0000",
 +
        "status": "SUCCESS",
 +
        "errors": [
 +
            {"type": "ERROR", "message": "Could not log into server X"},
 +
            {"type": "WARNING", "message": "No control plane access to related resource at IP address 1.2.3.4 "}
 +
        ],
 +
        "resources": {
 +
            "OS::DNS::Domain:123456": {
 +
                ...
 +
            },
 +
            "OS::DNS::Record:abcdef": {
 +
                ...
 +
            }, ...
 +
        }
 +
    }
 +
 
 +
=== Target Key  ===
 +
 
 +
'''Use Case''': It would be useful to keep track of what the discovery ran against.
 +
 
 +
'''Schema''': create a `target` key at the root.
 +
 
 +
=== Discovery Attributes  ===
 +
 
 +
'''Use Case''': We need to know when the discovery ran and other attributes about it..
 +
 
 +
'''Schema''': create `created`, `updated`, and `status` keys at the root.
 +
 
 +
=== Discovery Errors and Warnings  ===
 +
 
 +
'''Use Case''': When a discovery completes, it may have some partial errors or warnings, such as not being able to reach a specific server.
 +
 
 +
'''Schema''': create `log` key at the root ad place an array of entries under it.
 +
 
 +
=== Multiple Resources ===
 +
 
 +
'''Use Case''': We need to be able to support multiple resources in a single discovery.
 +
 
 +
'''Schema''': create a `resources` key at the root and place all resources under it. Generate a globally unique key for each.
 +
 
 +
=== DNS Resources ===
 +
 
 +
'''Use Case''': The DNS domain and DNS records are part of the configuration. They should go under resources discovered.
 +
 
 +
'''Schema''': add DNS Record and DNS Domain to `resources` like any other discovered resource.

Revision as of 19:04, 4 April 2014

Proposed New Schema for Satori Discovery

   {
       "target": "http://somedomain.com",
       "created": "2014-03-29 09:08:08 +0000",
       "updated": "2014-03-29 09:12:02 +0000",
       "status": "SUCCESS",
       "errors": [
           {"type": "ERROR", "message": "Could not log into server X"},
           {"type": "WARNING", "message": "No control plane access to related resource at IP address 1.2.3.4 "}
       ],
       "resources": {
           "OS::DNS::Domain:123456": {
               ...
           },
           "OS::DNS::Record:abcdef": {
               ...
           }, ...
       }
   }

Target Key

Use Case: It would be useful to keep track of what the discovery ran against.

Schema: create a `target` key at the root.

Discovery Attributes

Use Case: We need to know when the discovery ran and other attributes about it..

Schema: create `created`, `updated`, and `status` keys at the root.

Discovery Errors and Warnings

Use Case: When a discovery completes, it may have some partial errors or warnings, such as not being able to reach a specific server.

Schema: create `log` key at the root ad place an array of entries under it.

Multiple Resources

Use Case: We need to be able to support multiple resources in a single discovery.

Schema: create a `resources` key at the root and place all resources under it. Generate a globally unique key for each.

DNS Resources

Use Case: The DNS domain and DNS records are part of the configuration. They should go under resources discovered.

Schema: add DNS Record and DNS Domain to `resources` like any other discovered resource.