Esempio n. 1
0
        /// <summary>
        /// <para>From DMTF Spec:</para>This operation is used to return a single CIM Class from the target Namespace.
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="defaultNamespace"></param>
        /// <returns>The CimXml request as a string.</returns>
        public static void GetClass(CimXmlWriter cxw, GetClassOpSettings settings, CimName defaultNamespace)
        {
            #region Actual XML Request
            /*
            <?xml version="1.0" encoding="utf-8" ?>
            <CIM CIMVERSION="2.0" DTDVERSION="2.0">
                <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
                    <SIMPLEREQ>
                        <IMETHODCALL NAME="GetClass">
                            <LOCALNAMESPACEPATH>
                                <NAMESPACE NAME="smash"/>
                            </LOCALNAMESPACEPATH>
                            <IPARAMVALUE NAME="IncludeClassOrigin">
                                <VALUE>TRUE</VALUE>
                            </IPARAMVALUE>
                            <IPARAMVALUE NAME="ClassName">
                                <CLASSNAME NAME="CIM_PhysicalAssetCapabilities"/>
                            </IPARAMVALUE><IPARAMVALUE NAME="IncludeQualifiers">
                                <VALUE>TRUE</VALUE>
                            </IPARAMVALUE>
                            <IPARAMVALUE NAME="PropertyList">
                                <VALUE.ARRAY>
                                    <VALUE>Caption</VALUE>
                                    <VALUE>InstanceID</VALUE>
                                    <VALUE>ElementName</VALUE>
                                </VALUE.ARRAY>
                            </IPARAMVALUE>
                            <IPARAMVALUE NAME="LocalOnly">
                                <VALUE>FALSE</VALUE>
                            </IPARAMVALUE>
                        </IMETHODCALL>
                    </SIMPLEREQ>
                </MESSAGE>
            </CIM>
            */
            #endregion

            // Set the Method Name
            cxw.WriteIMethodCallStartElement("GetClass");

            // Set the namespace
            cxw.WriteCimNamespace(defaultNamespace);

            // Set the OpSettings
            cxw.WriteIncludeClassOrigin(settings.IncludeClassOrigin);
            cxw.WriteClassNameParam(settings.ClassName);
            cxw.WriteIncludeQualifiers(settings.IncludeQualifiers);
            cxw.WriteLocalOnly(settings.LocalOnly);
            cxw.WritePropertyList(settings.PropertyList);

            //</IMETHODCALL>
            cxw.WriteEndElement();
        }
Esempio n. 2
0
        /// <summary>
        /// <para>From DMTF Spec:</para>This operation is used to enumerate instances of a CIM Class (this includes instances in the class and any subclasses in accordance with the polymorphic nature of CIM objects) in the target Namespace.
        /// </summary>
        /// <param name="defaultNamespace"></param>
        /// <returns>The CimXml request as a string.</returns>
        public static void EnumerateInstances(CimXmlWriter cxw, EnumerateInstancesOpSettings settings, CimName defaultNamespace)
        {
            #region Actual XML Request
            /*
            <IMETHODCALL NAME="EnumerateInstances">
                <LOCALNAMESPACEPATH>
                    <NAMESPACE NAME="smash"/>
                </LOCALNAMESPACEPATH>
                <IPARAMVALUE NAME="IncludeClassOrigin">
                    <VALUE>TRUE</VALUE>
                </IPARAMVALUE>
                <IPARAMVALUE NAME="IncludeQualifiers">
                    <VALUE>TRUE</VALUE>
                </IPARAMVALUE>
                <IPARAMVALUE NAME="PropertyList">
                    <VALUE.ARRAY>
                        <VALUE>Caption</VALUE>
                        <VALUE>InstanceID</VALUE>
                        <VALUE>ElementName</VALUE>
                    </VALUE.ARRAY>
                </IPARAMVALUE>
                <IPARAMVALUE NAME="LocalOnly">
                    <VALUE>FALSE</VALUE>
                </IPARAMVALUE>
                <IPARAMVALUE NAME="ClassName">
                    <CLASSNAME NAME="CIM_Component"/>
                </IPARAMVALUE>
                <IPARAMVALUE NAME="DeepInheritance">
                    <VALUE>TRUE</VALUE>
                </IPARAMVALUE>
            </IMETHODCALL>
            */
            #endregion

            // Set the Method Name
            cxw.WriteIMethodCallStartElement("EnumerateInstances");

            // Set the namespace
            cxw.WriteCimNamespace(defaultNamespace);

            // Set the OpSettings
            cxw.WriteIncludeClassOrigin(settings.IncludeClassOrigin);
            cxw.WriteClassNameParam(settings.ClassName);
            cxw.WriteIncludeQualifiers(settings.IncludeQualifiers);
            cxw.WriteDeepInheritance(settings.DeepInheritance);
            cxw.WriteLocalOnly(settings.LocalOnly);
            cxw.WritePropertyList(settings.PropertyList);

            //</IMETHODCALL>
            cxw.WriteEndElement();
        }
Esempio n. 3
0
        /// <summary>
        /// <para>From DMTF Spec:</para>This operation is used to enumerate the names of subclasses of a CIM Class in the target Namespace.
        /// </summary>
        /// <param name="defaultNamespace"></param>
        /// <returns>The CimXml request as a string.</returns>
        public static void EnumerateClassNames(CimXmlWriter cxw, EnumerateClassNamesOpSettings settings, CimName defaultNamespace)
        {
            #region Actual XML Request
            /*
            <?xml version="1.0" encoding="utf-8" ?>
            <CIM CIMVERSION="2.0" DTDVERSION="2.0">
                <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
                    <SIMPLEREQ>
                        <IMETHODCALL NAME="EnumerateClassNames">
                            <LOCALNAMESPACEPATH>
                                <NAMESPACE NAME="smash"/>
                            </LOCALNAMESPACEPATH>
                            <IPARAMVALUE NAME="ClassName">
                                <CLASSNAME NAME="CIM_Component"/>
                            </IPARAMVALUE>
                            <IPARAMVALUE NAME="DeepInheritance">
                                <VALUE>TRUE</VALUE>
                            </IPARAMVALUE>
                        </IMETHODCALL>
                    </SIMPLEREQ>
                </MESSAGE>
            </CIM>
            */
            #endregion

            // Set the Method Name
            cxw.WriteIMethodCallStartElement("EnumerateClassNames");

            // Set the namespace
            cxw.WriteCimNamespace(defaultNamespace);

            // Set the OpSettings
            if (settings.ClassName.IsSet)
            {
                cxw.WriteClassNameParam(settings.ClassName);
            }
            cxw.WriteDeepInheritance(settings.DeepInheritance);

            //</IMETHODCALL>
            cxw.WriteEndElement();
        }
Esempio n. 4
0
        /// <summary>
        /// <para>From DMTF Spec:</para>This operation is used to enumerate the names (model paths) of the instances of a CIM Class (this includes instances in the class and any subclasses in accordance with the polymorphic nature of CIM objects) in the target Namespace.
        /// </summary>
        /// <param name="defaultNamespace"></param>
        /// <returns>The CimXml request as a string.</returns>
        public static void EnumerateInstanceNames(CimXmlWriter cxw, EnumerateInstanceNamesOpSettings settings, CimName defaultNamespace)
        {
            #region Actual XML Request
            /*
            <IMETHODCALL NAME="EnumerateInstanceNames">
                <LOCALNAMESPACEPATH>
                    <NAMESPACE NAME="smash"/>
                </LOCALNAMESPACEPATH>
                <IPARAMVALUE NAME="ClassName">
                    <CLASSNAME NAME="CIM_Component"/>
                </IPARAMVALUE>
            </IMETHODCALL>
            */
            #endregion

            // Set the Method Name
            cxw.WriteIMethodCallStartElement("EnumerateInstanceNames");

            // Set the namespace
            cxw.WriteCimNamespace(defaultNamespace);

            // Set the OpSettings
            cxw.WriteClassNameParam(settings.ClassName);

            //</IMETHODCALL>
            cxw.WriteEndElement();
        }
Esempio n. 5
0
        /// <summary>
        /// <para>From DMTF Spec:</para>This operation is used to delete a single CIM Class from the target Namespace.
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="defaultNamespace"></param>
        /// <returns>The CimXml request as a string.</returns>
        public static void DeleteClass(CimXmlWriter cxw, DeleteClassOpSettings settings, CimName defaultNamespace)
        {
            #region Actual XML Request
            /*
            <?xml version="1.0" encoding="utf-8" ?>
            <CIM CIMVERSION="2.0" DTDVERSION="2.0">
             <MESSAGE ID="87872" PROTOCOLVERSION="1.0">
              <SIMPLEREQ>
               <IMETHODCALL NAME="DeleteClass">
                <LOCALNAMESPACEPATH>
                 <NAMESPACE NAME="root"/>
                 <NAMESPACE NAME="cimv2"/>
                </LOCALNAMESPACEPATH>
                <IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="CIM_VideoBIOSElement"/></IPARAMVALUE>
               </IMETHODCALL>
              </SIMPLEREQ>
             </MESSAGE>
            </CIM>
            */
            #endregion

            // Set the Method Name
            cxw.WriteIMethodCallStartElement("DeleteClass");

            // Set the namespace
            cxw.WriteCimNamespace(defaultNamespace);

            //IPARAMVALUE
            cxw.WriteClassNameParam(settings.ClassName);

            //</IMETHODCALL>
            cxw.WriteEndElement();
        }