summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/admin.rnc
blob: 36af33d06cb67b6cc381cdc5a16561e8f21b0833 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
Admin = AdminV2 | AdminV3 | AdminV4

AdminV2 =
 element admin {
   attribute version { "2.0" } &
   element adminserver { service.attlist } &
   GenericConfig* &
   LogServer? &
   (ConfigServer | ConfigServers)? &
   FileDistribution? &
   AdminSlobroks? &
   AdminYamas? &
   MetricConsumers? &
   ClusterControllers?
 }

AdminV3 =
  element admin {
    attribute version { "3.0"  } &
    Nodes
  }

AdminV4 =
  element admin {
    attribute version { "4.0"  } &
    AdminV4Slobroks? &
    AdminV4LogServers?
  }

AdminV4Slobroks =
  element slobroks {
    OptionalDedicatedNodes
  }

AdminV4LogServers =
  element logservers {
    OptionalDedicatedNodes
  }

AdminSlobroks =
   element slobroks {
      element slobrok {
         service.attlist &
         attribute index { xsd:nonNegativeInteger }?
      }+
   }

AdminYmon =
   element ymon {
      attribute endpoint { xsd:anyURI { minLength = "1" } }?,
      attribute clustername { xsd:NCName }?,
      attribute interval { xsd:int }?
   }

AdminYamas =
   element yamas {
      attribute interval { xsd:int }?,
      attribute systemname { xsd:string }?
   }


ConfigServer = element configserver {
   service.attlist
}

ConfigServers = element configservers {
   ConfigServer+
}

LogServer = element logserver {
   service.attlist
}

FileDistribution = element filedistribution {
   element uploadbitrate { xsd:string {   pattern = "\d+(\.\d*)?\s*[kmgKMG]?" } }? &
   element downloadbitrate { xsd:string { pattern = "\d+(\.\d*)?\s*[kmgKMG]?" } }?
}

MetricConsumers = element metric-consumers {
    element consumer {
        attribute name { xsd:string { pattern = "[a-zA-Z][_a-zA-Z0-9]*" } }&
        element metric {
            attribute name{xsd:Name} &
            attribute output-name{xsd:Name}?
         }+
    }+
}

ClusterControllers = element cluster-controllers {
    attribute standalone-zookeeper { xsd:string  }? &
    element cluster-controller {
       service.attlist
    }+
}