HPE Developer Community Portal
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.
New 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.
Modify the application setup
Edit the following settings to match you setup
- Select Outbound-Rest and edit each of the OneSphere API's to point to your OneSphere instance, username and password
- Edit the application "OneSphere integration" to provide a specific role access to use the application. I have chosen the admin role. All users with this role can now use the application.
Edit settings in Outbound REST
Application user setting
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.
Create a 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
ServiceNow workflow for new project approval by manager
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.
ServiceNow business rule as implemented in sample integration with OneSphere
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.
Stay in the loop
Sign up and be the first to know about our development platforms, news and project information as it becomes available.
By signing up for the HPE Developer Community Portal mailing list you agree to receive periodic email communications from our team.