Mi: track/untrack: validation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 11 Aug 2015 19:15:27 +0000 (15:15 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 14 Aug 2015 21:56:21 +0000 (17:56 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/mi_lttng.xsd

index 44a7bc97348f12a0f0f2523ad6e46d3f10acf180..11d60d047b15cae09bd1f5105830e66684c5700d 100644 (file)
@@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 -->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-       elementFormDefault="qualified" version="2.5">
+       elementFormDefault="qualified" version="2.7">
 
        <!-- Maps to the uint32_t type -->
        <xs:simpleType name="uint32_type">
@@ -263,19 +263,74 @@ THE SOFTWARE.
                </xs:restriction>
        </xs:simpleType>
 
-       <!-- map to a pid -->
-       <xs:complexType name="pid_type">
+       <!-- Maps to a process -->
+       <xs:complexType name="process_type">
                <xs:all>
-                       <xs:element name="id" type="xs:int" />
-                       <xs:element name="name" type="name_type" />
+                       <xs:element name="pid" type="xs:int" />
+                       <xs:element name="name" type="name_type" minOccurs="0" />
                        <xs:element name="events" type="event_list_type" minOccurs="0" />
+                       <xs:element name="success" type="xs:boolean" default="false" minOccurs="0" />
                </xs:all>
        </xs:complexType>
 
-       <!-- maps to an array of pid -->
+       <!-- Maps to an array of pid -->
        <xs:complexType name="pids_type">
                <xs:sequence>
-                       <xs:element name="pid" type="pid_type" minOccurs="0" maxOccurs="unbounded" />
+                       <xs:element name="pid" type="xs:int" minOccurs="0" maxOccurs="unbounded" />
+               </xs:sequence>
+       </xs:complexType>
+
+       <!-- Maps to an array of processes -->
+       <xs:complexType name="processes_type">
+               <xs:sequence>
+                       <xs:element name="process" type="process_type" minOccurs="0" maxOccurs="unbounded" />
+               </xs:sequence>
+       </xs:complexType>
+
+       <xs:simpleType name="pidbyint">
+               <xs:restriction base="xs:integer">
+                       <xs:minInclusive value="0"/>
+                       <xs:maxInclusive value="4294967295" />
+               </xs:restriction>
+       </xs:simpleType>
+
+       <xs:simpleType name="pidwildcard">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="*"/>
+               </xs:restriction>
+       </xs:simpleType>
+
+       <xs:complexType name="pid_target_type">
+               <xs:all>
+                       <xs:element name="pid">
+                               <xs:simpleType>
+                                       <xs:union memberTypes="pidbyint pidwildcard" />
+                               </xs:simpleType>
+                       </xs:element>
+                       <xs:element name="success" type="xs:boolean" default="false" minOccurs="0" />
+               </xs:all>
+       </xs:complexType>
+
+       <!-- Maps to a list of pid_targets-->
+       <xs:complexType name="targets_type">
+               <xs:sequence>
+                       <xs:choice>
+                               <xs:element name="pid_target" type="pid_target_type" minOccurs="0" maxOccurs="unbounded"/>
+                       </xs:choice>
+               </xs:sequence>
+       </xs:complexType>
+
+       <!-- Maps to a pid_tracker-->
+       <xs:complexType name="pid_tracker_type">
+               <xs:all>
+                       <xs:element name="targets" type="targets_type" />
+               </xs:all>
+       </xs:complexType>
+
+       <!-- Maps to a list of trackers-->
+       <xs:complexType name="trackers_type">
+               <xs:sequence minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="pid_tracker" type="pid_tracker_type" maxOccurs="1" />
                </xs:sequence>
        </xs:complexType>
 
@@ -284,9 +339,10 @@ THE SOFTWARE.
                <xs:all>
                        <xs:element name="type" type="domain_type_type" />
                        <xs:element name="buffer_type" type="domain_buffer_type" />
-                       <xs:element name="pids" type="pids_type" minOccurs="0" />
+                       <xs:element name="processes" type="processes_type" minOccurs="0" />
                        <xs:element name="channels" type="channels_type" minOccurs="0" />
                        <xs:element name="events" type="event_list_type" minOccurs="0" />
+                       <xs:element name="trackers" type="trackers_type" minOccurs="0" />
                </xs:all>
        </xs:complexType>
 
@@ -465,6 +521,7 @@ THE SOFTWARE.
                        <xs:element name="channels" type="channels_type" minOccurs="0" />
                        <xs:element name="events" type="event_list_type" minOccurs="0" />
                        <xs:element name="channel" type="channel_type" minOccurs="0" />
+                       <xs:element name="targets" type="targets_type" minOccurs="0" />
                </xs:choice>
        </xs:complexType>
 
@@ -487,6 +544,8 @@ THE SOFTWARE.
                        <xs:enumeration value="set-session" />
                        <xs:enumeration value="disable-event" />
                        <xs:enumeration value="disable-channel" />
+                       <xs:enumeration value="track" />
+                       <xs:enumeration value="untrack" />
                </xs:restriction>
        </xs:simpleType>
 
This page took 0.029831 seconds and 4 git commands to generate.