PowerEdge: 열거 이상의 WSMAN 살펴보기

Summary: Dell TechCenter의 Dell OS 및 애플리케이션 솔루션 - Project Sputnik, Microsoft Windows, Red Hat Linux, SUSE, Ubuntu 등

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

WSMAN은 Dell iDRAC용으로 선택된 관리 API이며 원격 시스템 관리를 가능한 한 포괄적으로 만들기 위해 광범위한 노력이 진행 중입니다. 플러그인
에 대한 WSMAN 프로토콜을 연구 한 후 초기 열거 작업에 따라 복잡해진다는 것을 알았습니다. 올바른 키 속성을 사용하여 get/put/create/delete/custom Actions를 호출하는 방법에 대한 설명서나 예제가 없습니다. 이 정보의 주요 출처는 DMTF의 WSMAN 사양 및 WSMAN-CIM 바인딩 사양으로 따르기에는 너무 길고 복잡합니다. 다시 말하지만, 이 문서 콘텐츠의 대부분은 DMTF 사양 문서의 내용입니다. 이것은 해당 정보를 몇 가지 예제(Linux)로 소화하려는 시도입니다.

 이미 다음에서 SFCB와 openwsman을 시작하는 방법에 대한 백서를 게시했습니다. https://linux.dell.com/files/whitepapers/WBEM_based_management_in_Linux.pdf. WSMAN 및 SFCB를 처음 접하는 경우 pdf가 이 기사보다 더 나은 출발점이 될 것입니다. 위의 백서에서와 같이 이 기사에서는

주로 openwsman 및 SFCB CIMOM 구현을 다룹니다. 이제 WSMAN 서버가 주어졌을 때 wsman API로 관리할 수 있는 모든 구성 요소를 나열할 수 있는 방법이 있습니까? 대부분의 WSMAN 서버는 백엔드의 CIMOM과 통신하고 CIMOM의 관리 기능을 노출합니다. 즉, WSMAN 서버의 관리 기능은 백엔드의 CIMOM에 등록된 CIM 공급자에 따라 달라집니다. CIMOM에는 CIMOM에 등록된 모든 클래스를 나열하기 위해 호출할 수 있도록 정의된 EnumerateClassNames라는 이름의 내장 함수가 있습니다.

Cause

WSMAN 사양에는 EnumerateClassNames 에 대한 일대일 매핑이 없으므로 이 메서드는 WSMAN의 다른 사용자 지정 함수처럼 호출됩니다. 이는 구현에 따라 다르며 wsmancli 구현에 적용됩니다. 이 내용은 향후 릴리스에서 달라지거나 업데이트될 수 있습니다.

Resolution

CIMOM의 내장 함수 EnumerateClassNames 함수를 사용하여 다음과 같이 호출할 수 있습니다. wsmancli:

 

wsman invoke -a EnumerateClassNames --hostname=test_host --port=5985 --username=abc --password=password http://schemas.openwsman.org/wbem/wscim/1/instrinsic  --namespace=root/cimv2

 

 <s:Body>

    <n1:EnumerateClassNames>

      <n1:name>root/cimv2:CIM_Service</n1:name>

      <n1:name>root/cimv2:Syslog_RecordInLog</n1:name>

      <n1:name>root/cimv2:Linux_SambaValidUsersForShare</n1:name>

       <n1:name>root/cimv2:Linux_BaseBoard</n1:name>

      <n1:name>root/cimv2:Linux_SambaForceUserForShare</n1:name>

      <n1:name>root/cimv2:Linux_Processor</n1:name>

      <n1:name>root/cimv2:CIM_RecordForLog</n1:name>

      <n1:name>root/cimv2:Linux_SambaShareForService</n1:name>

      <n1:name>root/cimv2:Linux_SambaServiceConfigurationForService</n1:name>

      <n1:name>root/cimv2:Linux_SambaHostsForService</n1:name>

      <n1:name>root/cimv2:Linux_SambaForceUserForGlobal</n1:name>

      <n1:name>root/cimv2:CIM_OSProcess</n1:name>

      <n1:name>root/cimv2:CIM_RunningOS</n1:name>...................
 

출력은 위와 같으며, 네임스페이스 root/cimv2에서 Linux_Processor 등록된 클래스 중 하나입니다. 새 클래스가 등록될 때 여러 CIM 클래스가 상속됩니다. root 또는 cimv2를 실행하면 해당 클래스 이름이 모두 나열됩니다. 일반적으로 모든 클래스를 무시할 수 있습니다. CIM_ 접두사. Linux_ 접두사가 있는 모든 클래스는 Linux 시스템에 설치된 공급자가 등록한 클래스입니다.
Dell의 iDRAC을 사용할 때 여러분은 주로 다음과 같은 수업에 관심이 있습니다. DCIM_ prefix.

 클래스 이름 목록과 함께 getClass 함수를 사용하여 Linux_Processor 클래스 정의는 다음과 같습니다.

 

wsman invoke -a GetClass --hostname=test_host --port=5985 --username=abc --password=password http://schemas.openwsman.org/wbem/wscim/1/intrinsic/Linux_Processor  --namespace=root/cimv2
 

 위의 명령은 에 정의된 모든 속성을 나열합니다. Linux_Processor 로컬로. 즉, 다른 속성에서 상속된 CIM_* 클래스는 현재 구현에 나열되지 않습니다. 클래스 정의는 메서드, 매개 변수 및 키 속성을 표시하지만 명령은 로컬 속성만 반환하므로 키 속성을 식별할 수 없습니다. 다시 말하지만, 이것은 wsmancli을 클릭합니다.

동안 GetClass 는 좋은 시작이지만 출력은 get 또는 put 또는 create 또는 사용자 지정 작업을 호출하기 위한 주요 속성을 식별하기에 충분하지 않습니다.
그렇다면 이를 달성하기 위해 사용할 수 있는 다른 기술은 무엇입니까? 바로 이 부분에서 EPR이 도움이 될 수 있습니다.


EPR(End-Point Reference)은 두 가지 정보가 있는 인스턴스에 대한 포인터입니다. ResourceURI 및 선택기 세트. OPER는 ResourceURI 에는 인스턴스가 생성된 클래스 이름이 있으며 선택기 집합에는 인스턴스를 고유하게 식별할 수 있는 속성이 나열됩니다. 특정 클래스의 EPR은 다음과 유사한 명령을 사용하여 열거할 수 있습니다.

wsman enumerate -M epr  http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_Processor -h test_host-P 5985 -u abc -p password -O out

 <?xml version="1.0" encoding="UTF-8"?>

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">

  <s:Header>

    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>

    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse</wsa:Action>

    <wsa:RelatesTo>uuid:ca52c9e9-cd47-1d47-8003-a52924d9bed4</wsa:RelatesTo>

    <wsa:MessageID>uuid:ca622bb3-cd47-1d47-8097-a52924d9bed4</wsa:MessageID>

  </s:Header>

  <s:Body>

    <wsen:PullResponse>

      <wsen:EnumerationContext>ca4fdd21-cd47-1d47-8095-a52924d9bed4</wsen:EnumerationContext>

      <wsen:Items>

        <wsa:EndpointReference>

          <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>

          <wsa:ReferenceParameters>

            <wsman:ResourceURI>http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_Processor</wsman:ResourceURI>

            <wsman:SelectorSet>

              <wsman:Selector Name="__cimnamespace">root/cimv2</wsman:Selector>

              <wsman:Selector Name="SystemCreationClassName">Linux_ComputerSystem</wsman:Selector>

              <wsman:Selector Name="SystemName">localhost.localdomain</wsman:Selector>

              <wsman:Selector Name="CreationClassName">Linux_Processor</wsman:Selector>

              <wsman:Selector Name="DeviceID">0</wsman:Selector>

            </wsman:SelectorSet>

          </wsa:ReferenceParameters>

        </wsa:EndpointReference>

      </wsen:Items>

    </wsen:PullResponse>

  </s:Body>

</s:Envelope>



타겟 시스템의 모든 프로세서 중에서 위의 출력은 하나의 프로세서입니다.
출력에서 resourceURI는 다음과 같이 나열됩니다. https://sblim.sourceforge.net/wbem/wscim/1/cim-schema/2/Linux_ProcessorSelectorSet 의 값을 나열합니다. __cimnamespace, SystemCreationClassName, SystemName, CreationClassName, and DeviceID. 즉, 상속되고 로컬로 정의된 클래스의 모든 속성을 사용하여 인스턴스를 고유하게 식별할 수 있습니다.


 따라서 다음과 같은 명령에서 유효한 응답을 기대할 수 있습니다.

wsman get  http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_Processor?SystemCreationClassName="Linux_ComputerSystem",SystemName="localhost.localdomain",CreationClassName="Linux_Processor",DeviceID="3",__cimnamespace="root/cimv2" -h test_host -P 5985 -u abc -p password -O get



 위 요청에서 다른 속성이 사용된 경우 백엔드의 CIMOM은 인스턴스를 고유하게 식별할 수 없습니다. 인스턴스에서 사용자 지정 메서드를 실행하려면 클래스의 EPR을 사용하여 메서드 호출을 위한 키 속성을 식별합니다.


연관 EPR도 열거할 수 있습니다. 클래스 이름이 주어진 경우 표준 클래스 이름인지 연관 클래스인지 알 수 없습니다. 연결 인스턴스는 두 개의 인스턴스를 가리키므로 EPR에는 참조하는 인스턴스 또는 개체의 EPR이 포함됩니다. 다음은 동일한 예입니다.

wsman enumerate -M epr  http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_CSProcessor -h test_host -P 5985 -u abc -p password -O out

 <?xml version="1.0" encoding="UTF-8"?>

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">

  <s:Header>

    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>

    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse</wsa:Action>

    <wsa:RelatesTo>uuid:2efbfcad-cd4b-1d4b-8003-a52924d9bed4</wsa:RelatesTo>

    <wsa:MessageID>uuid:2efc1c6f-cd4b-1d4b-80b3-a52924d9bed4</wsa:MessageID>

  </s:Header>

  <s:Body>

    <wsen:PullResponse>

      <wsen:EnumerationContext>2ef7f6f5-cd4b-1d4b-80b1-a52924d9bed4</wsen:EnumerationContext>

      <wsen:Items>

        <wsa:EndpointReference>

          <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>

          <wsa:ReferenceParameters>

            <wsman:ResourceURI>http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_CSProcessor</wsman:ResourceURI>

            <wsman:SelectorSet>

              <wsman:Selector Name="__cimnamespace">root/cimv2</wsman:Selector>

              <wsman:Selector Name="GroupComponent">

                <wsa:EndpointReference>

                  <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>

                  <wsa:ReferenceParameters>

                    <wsman:ResourceURI>http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_ComputerSystem</wsman:ResourceURI>

                    <wsman:SelectorSet>

                      <wsman:Selector Name="CreationClassName">Linux_ComputerSystem</wsman:Selector>

                      <wsman:Selector Name="Name">localhost.localdomain</wsman:Selector>

                      <wsman:Selector Name="__cimnamespace">root/cimv2</wsman:Selector>

                    </wsman:SelectorSet>

                  </wsa:ReferenceParameters>

                </wsa:EndpointReference>

              </wsman:Selector>

              <wsman:Selector Name="PartComponent">

                <wsa:EndpointReference>

                  <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>

                  <wsa:ReferenceParameters>

                    <wsman:ResourceURI>http://sblim.sf.net/wbem/wscim/1/cim-schema/2/Linux_Processor</wsman:ResourceURI>

                    <wsman:SelectorSet>

                      <wsman:Selector Name="SystemCreationClassName">Linux_ComputerSystem</wsman:Selector>

                      <wsman:Selector Name="SystemName">localhost.localdomain</wsman:Selector>

                      <wsman:Selector Name="CreationClassName">Linux_Processor</wsman:Selector>

                      <wsman:Selector Name="DeviceID">0</wsman:Selector>

                      <wsman:Selector Name="__cimnamespace">root/cimv2</wsman:Selector>

                    </wsman:SelectorSet>

                  </wsa:ReferenceParameters>

                </wsa:EndpointReference>

              </wsman:Selector>

            </wsman:SelectorSet>

          </wsa:ReferenceParameters>

        </wsa:EndpointReference>

      </wsen:Items>

    </wsen:PullResponse>

  </s:Body>

</s:Envelope>



Linux_CSProcessor 링크 Linux_ComputerSystemLinux_Processor, 프로세서가 컴퓨터 시스템에 있음을 보여 주며 자세히 설명합니다. GroupComponentPartComponent 섹션.

나는 EPR과 인스턴스 액세스에 대한 EPR의 사용법을 이해하는 데 시간을 보냈고 다른 사람들에게 도움이 될 수 있다고 생각했습니다. 아래에 의견이나 제안을 남겨주세요.

면책 조항:

위 기사는 정보 제공의 목적으로만 사용됩니다. 내용은 언급된 기술과 용어에 대한 저의 해석에서 나온 것입니다. 이 정보는 있는 그대로 제공되며 일부 입력 오류 및/또는 기술적으로 부정확한 내용이 있을 수 있습니다.
 

Affected Products

SUSE Linux Enterprise Server 12, Red Hat Enterprise Linux Version 9, Red Hat Enterprise Linux Version 8, SUSE Linux Enterprise Server 15, Ubuntu Server LTS

Products

C Series, HS Series, Modular Infrastructure, Rack Servers, Tower Servers, XE Servers, XR Servers, OEM Server Solutions
Article Properties
Article Number: 000145895
Article Type: Solution
Last Modified: 10 Sept 2026
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.