/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.8.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.cloudera.api.swagger;

import com.cloudera.api.swagger.client.ApiException;
import com.cloudera.api.swagger.model.ApiCmPeer;
import com.cloudera.api.swagger.model.ApiCmPeerList;
import com.cloudera.api.swagger.model.ApiCommand;
import org.junit.Test;
import org.junit.Ignore;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * API tests for CmPeersResourceApi
 */
@Ignore
public class CmPeersResourceApiTest {

    private final CmPeersResourceApi api = new CmPeersResourceApi();

    
    /**
     * Create a new Cloudera Manager peer.
     *
     * Create a new Cloudera Manager peer. &lt;p&gt; The remote server will be contacted so that a user can be created for use by the new peer. The &lt;i&gt;username&lt;/i&gt; and &lt;i&gt;password&lt;/i&gt; properties of the provided peer object should contain credentials of a valid admin user on the remote server. A timeout of 10 seconds is enforced when contacting the remote server. &lt;p&gt; It is recommended to run the remote server with TLS enabled, since creating and using peers involve transferring credentials over the network. &lt;p&gt; Available since API v3. Only available with Cloudera Manager Enterprise Edition. &lt;p&gt; Type field in ApiCmPeer is available since API v11. if not specified when making createPeer() call, &#39;REPLICATION&#39; type peer will be created.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void createPeerTest() throws ApiException {
        ApiCmPeer body = null;
        ApiCmPeer response = api.createPeer(body);

        // TODO: test validations
    }
    
    /**
     * Delete Cloudera Manager peer.
     *
     * Delete Cloudera Manager peer. &lt;p&gt; An attempt will be made to contact the peer server, so that the configured user can be deleted.. Errors while contacting the remote server are non-fatal. &lt;p&gt; Available since API v11. Only available with Cloudera Manager Enterprise Edition.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void deletePeerTest() throws ApiException {
        String peerName = null;
        String type = null;
        ApiCmPeer response = api.deletePeer(peerName, type);

        // TODO: test validations
    }
    
    /**
     * Retrieves all configured Cloudera Manager peers.
     *
     * Retrieves all configured Cloudera Manager peers. &lt;p&gt; Available since API v3. Only available with Cloudera Manager Enterprise Edition. &lt;p&gt; When accessed via API version before v11, only REPLICATION type peers will be returned.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void listPeersTest() throws ApiException {
        ApiCmPeerList response = api.listPeers();

        // TODO: test validations
    }
    
    /**
     * Fetch information about an existing Cloudera Manager peer.
     *
     * Fetch information about an existing Cloudera Manager peer. &lt;p&gt; Available since API v11. Only available with Cloudera Manager Enterprise Edition.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void readPeerTest() throws ApiException {
        String peerName = null;
        String type = null;
        ApiCmPeer response = api.readPeer(peerName, type);

        // TODO: test validations
    }
    
    /**
     * Test the connectivity of a peer.
     *
     * Test the connectivity of a peer. &lt;p&gt; Available since API v11. Only available with Cloudera Manager Enterprise Edition.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void testPeerTest() throws ApiException {
        String peerName = null;
        String type = null;
        ApiCommand response = api.testPeer(peerName, type);

        // TODO: test validations
    }
    
    /**
     * Update information for a Cloudera Manager peer.
     *
     * Update information for a Cloudera Manager peer. &lt;p&gt; In administrator credentials are provided in the peer information, they will be used to establish new credentials with the remote server. This can be used in case the old credentials are not working anymore. An attempt will be made to delete the old credentials if new ones are successfully created. &lt;p&gt; If changing the peer&#39;s URL, an attempt will be made to contact the old Cloudera Manager to delete the existing credentials. &lt;p&gt; Available since API v3. Only available with Cloudera Manager Enterprise Edition.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void updatePeerTest() throws ApiException {
        String peerName = null;
        ApiCmPeer body = null;
        ApiCmPeer response = api.updatePeer(peerName, body);

        // TODO: test validations
    }
    
}
