CMP - Guest Interface & Host ResourceDescription<!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --> CAPI Providers, Interface and API While working with ServiceNow Cloud Management Platform (CMP), the operations are designed under the Resource interfaces also called CAPI Interface, this article to demonstrate the Interfaces in CMP. CAPI Providers: Providers are a collection of software products and Cloud providers supported by CMP(AWS, AZURE and VMware). Each provider has a collection of products associated with it. CAPI Interface: The interface defines the framework required to make REST API calls to the products/services listed in the CAPI Providers.Interfaces provide common endpoints for different cloud services and enable abstraction Interfaces define operations, also called methods, and the parameters that each method requires.Interfaces are reusable. If extend CAPI to include new products and APIs, you can use existing interfaces to make the same REST calls.An Interface has: A Name Set of Operations which takes inputs Cloud API: The CAPI API implements the code that is required to make REST API calls to a product or cloud serviceThe API is the actual implementation of the operations in an interface. The Cloud API that is created has a related list of CAPI Method Mappers, these are the definitions for the implementation of each operation in the interface. Guest Interface & Host Resource The operations under Cloud Management Platform(CMP) are configured to execute from the ResourceBlock and each ResourceBlock associated with minimum two interfaces Guest Interface and Host Interface. Guest Interface: Every Resource Block consists of Resource Guest Interfaces which list all the available Interfaces,The guest interface provides information about the Cloud API interface that'll be used to accomplish the CAPI operations.User / Admin have privileges to add customized Guest Interfaces to enable the custom operations without disturbing OOB. Refer: Create a custom guest interface. Host Resource: The Host Resource contains the list of Datacenters on which the listed Guest Interface operations can be available.Example: If Guest Interface has "Discovery Interface" and the Host Interface has "AZURE" and "AWS" Datacenters available but not VMware, it means the Cloud Discovery operation only works for AWS and AZURE.Note: Host Resource also was called as Host Interface Example "Azure Datacentre" Resource Block Log in to the instance Impersonate with the user having roles to modify ResourceBlocks (sn_cmp_admin)Navigator >> Cloud Management >> Admin Portal >> Design >> Resource Blocks Resource Blocks >> Choose "AzureDatacenter" and click to open General Information >> Guest Interface which contains a list of interfaces associated General Information >> Host Interface >> Observe no Data, because of the Azure Datacenter ResourceBlock itself representing the Cloud Provider.All the operations mentioned in the above Guest Interface are must need to execute from Azure Datacenter API "Virtual Server" Resource Block Log in to the instance Impersonate with the user having roles to modify ResourceBlocks (sn_cmp_admin)Navigator >> Cloud Management >> Admin Portal >> Design >> Resource Blocks Resource Blocks >> Choose "Virtual Server" and click to open General Information >> Guest Interface which contains a list of interfaces associated. General Information >> Host Interface >> Observe it has all the available Datacenters which mean the Operations under above Guest Interface has the ability to run on any of the Datacenter. As the Host Resource has all the Datacenters available, when a Virtual server related operation occurs on a specific Datacenter the Resource communicates with that specific APIExample: User has chosen to provision a VM from AWS datacenter The Provision Operation initially looks into the "Virtual Server" ResourceBlock and see if the Host Resource have the AWS Datacenter available If the Host Resource has the AWS Datacenter available then the Operations listed in the Guest interface pass the input parameters to Azure Datacenter API to complete the transaction for a successful provision. If the Host Resource does not have the AWS Datacenter available, the Provision fails as the specified datacenter is not available. Additional Information Create a custom resource blockAdd operation steps to a resource block