Integrations > HPE Product Integrations > HPE OneView Pull Integration > How to Integrate with OneView 1.x

How to Integrate with OneView 1.x

To integrate with OneView 1.x, do the following:

  • Change the source attribute powerState of the CI type interconnect to powerStatus in the configuration file oneview.xml as follows:

    <source_ci_type name="interconnect" query="/rest/interconnects" base="members">
      <target_ci_type name="fcswitch">
    ...
        <target_attribute name="fcswitch_status">
          <map type="direct" source_attribute="powerStatus"/>
        </target_attribute>
    ...
      </target_ci_type>
    </source_ci_type>
  • Replace self._apiVersion = 200 with self._apiVersion = 4 in oneview_client.py as follows:

    class OneViewClient(object):
      def __init__(self, url, trustAllCerts=True):
        self.url = url
        self._apiVersion = 4
        self._headers = {'X-API-Version': self._apiVersion,
    	'Accept': 'application/json',
    	'Content-Type': 'application/json'
    }

Note For OneView versions 2.x and 3.0, the default settings are as follows:

  • source_attribute = PowerState in oneview.xml
  • self._apiVersion = 200 in oneview_client.py

The table lists the supported attributes for the fibre channel switches obtained from the /rest/interconnects API for different API and OneView versions:

API Version

Source Attribute Name

Version 1 Support

Version 2 Support

Version 3 Support

4

powerStatus

Yes

No

No

4

powerState

No

Yes

No

200

powerStatus

No

No

No

200

PowerState

No

Yes

Yes