HPE OneSphere ServiceNow Integration
HPE OneSphere is a multi-cloud management platform, essentially allowing end users to create an instance for their workload on-demand with a cloud vendor, in a vendor agnostic manner. To use HPE OneSphere, a user will need to create a project in OneSphere. The project should have specific attributes set via tags and also the project members and owners need to be set to ensure only approved members have project access. Once set, the user can login and create instances in any cloud attached to OneSphere. In this blog I will explain how a self service ticketing tool like ServiceNow can be integrated with OneSphere. The use case involves a user requesting a project in OneSphere and, once approved by his manager, the project is created in OneSphere. I have leveraged ServiceNow application integration interfaces and OneSphere REST APIs to build this integration. This blog walks you through the various steps to build an integration and you can reuse the same steps to build other integrations or extend this one in future.
Sample application in ServiceNow
Import sample OneSphere-ServiceNow application
ServiceNow Studio is an IDE for ServiceNow and it is integrated with Git. To get started, open ServiceNow Studio and import from source control. Use the following Git location to import the sample integration https://github.com/HewlettPackard/hpe-onesphere-servicenow
Import application to ServiceNow Studio
Browse through the sample integration
On the left panel you can see Tables, Forms, Business Rules and workflows.
ServiceNow Studio view
Edit application to provide the HPE OneSphere details
Open the "Business Rule" (Script Action View) and provide values for these three attribtes
Edit application configuration
Create a new request
Now that you are all setup, launch your first request to OneSphere. In the search menu, search for "OneSphere". You will see a new form by the name "Create project". Select it to view the new form request. Submit your request with the project name, owner, member, tags etc.
Submit new project request
ServiceNow workflow to approve project request
Once the user has submitted a request, this will have to be approved by the project manager before the request is sent to OneSphere. Fred Luddy (in this example) is the manager, will approve the project.
Trivia : "Fred Luddy" is the founder of ServiceNow !!
Approve project request
What happens after approval ?
- /rest/session to get session token
- /rest/projects to create a project
- /rest/users to get user URI and to add users if non-existent
- /rest/membership-roles to get project-owner and project-member role URIs
- /rest/memberships to add users as project owner or member of a project
- /rest/password-reset to reset user password if the user does not exist and this application created her/him.
Business rule in ServiceNow
Project created in OneSphere
Post approval the project is then created in OneSphere. If any of the project members or owners do not exist, they are created in OneSphere and a password reset is initiated. The user will be notified via email to change the password.
"DemoServicenow" Project created in OneSphere
"DemoServicenow" Project settings
This completes the sample integration for ServiceNow with OneSphere. This can be further extended to change the AWS configuration for the user or add more members, etc. Also, this can be further extended to build a Service Catalog in ServiceNow.