The initial formula metadata schema definition proposition

Change-Id: Ic6f925d1bcfc63f2d8a71d032f6a2208f1b65444
diff --git a/ntp/meta/meta.yml b/ntp/meta/meta.yml
new file mode 100644
index 0000000..097f691
--- /dev/null
+++ b/ntp/meta/meta.yml
@@ -0,0 +1,15 @@
+graph:
+{%- if pillar.get('ntp', {}).client is defined %}
+{%- from "ntp/map.jinja" import client with context %}
+- host: {{ grains.id }}
+  service: ntp.client
+  type: software-system
+  relations:
+  {%- for stratum in client.strata %}
+  - service: other-service
+    host_external: udp://{{ stratum }}
+    direction: source
+    type: udp
+  {%- endfor %}
+{%- endif %}
+
diff --git a/ntp/schemas/client.yaml b/ntp/schemas/client.yaml
new file mode 100644
index 0000000..fc92778
--- /dev/null
+++ b/ntp/schemas/client.yaml
@@ -0,0 +1,30 @@
+%YAML 1.1
+---
+$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
+title: NTP client role
+description: |
+  NTP service, client role.
+type: object
+additionalProperties: false
+
+required:
+- enabled
+
+properties:
+  enabled:
+    description: |
+      Enables NTP client service.
+    type: boolean
+  strata:
+    description: |
+      List of NTP stratums to keep the time in sync.
+    type: array
+    items:
+      $ref: "#/definitions/stratum"
+
+definitions:
+  stratum:
+    description: |
+      Hostname or IP address of the stratum server.
+    type: string
+    format: hostname-ip
diff --git a/ntp/schemas/server.yaml b/ntp/schemas/server.yaml
new file mode 100644
index 0000000..922acb8
--- /dev/null
+++ b/ntp/schemas/server.yaml
@@ -0,0 +1,70 @@
+%YAML 1.1
+---
+$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
+title: NTP server role
+description: |
+  NTP service, server role.
+type: object
+additionalProperties: false
+
+required:
+- enabled
+
+properties:
+  enabled:
+    description: |
+      Enables NTP server service.
+    type: boolean
+  mode7:
+    description: |
+      Enables mode7 for the NTP server.
+    type: boolean
+  orphan:
+    description: |
+      Sets the orphan level of the NTP server.
+    type: number
+    minimum: 0
+    maximum: 8
+  restrict:
+    description: |
+      List of subnets that servers gives time to.
+    type: array
+    items:
+      $ref: "#/definitions/restrict"
+  peers:
+    description: |
+      List of peered NTP stratum services.
+    type: array
+    items:
+      $ref: "#/definitions/peer"
+
+definitions:
+  restrict:
+    description: |
+      Restrict the service to given networks.
+    type: object
+    flowStyle: block
+    propertyOrder: [subnet, mask,options]
+    required: [subnet, mask]
+    properties:
+      subnet:
+        description: |
+          IP address of the network
+        type: string
+        style: inline
+      mask:
+        description: |
+          Subnet mask of the network
+        type: string
+        style: inline
+      options:
+        description: |
+          Additional options passed to the net [notrap nomodify]
+        type: string
+        style: inline
+    additionalProperties: false
+  peer:
+    description: |
+      Hostname or IP address of the peer server.
+    type: string
+    format: hostname-ip