/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.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.model.ApiCommand;
import com.cloudera.api.swagger.model.ApiComponentInfo;
import com.cloudera.api.swagger.model.ApiConfigList;
import com.cloudera.api.swagger.model.ApiEntityTag;
import com.cloudera.api.swagger.model.ApiGenerateHostCertsArguments;
import com.cloudera.api.swagger.model.ApiGenericResponse;
import com.cloudera.api.swagger.model.ApiHost;
import com.cloudera.api.swagger.model.ApiHostList;
import com.cloudera.api.swagger.model.ApiHostMaintenanceResponseList;
import com.cloudera.api.swagger.model.ApiHostNameList;
import com.cloudera.api.swagger.model.ApiHostsToRemoveArgs;
import com.cloudera.api.swagger.model.ApiMetricList;
import com.cloudera.api.swagger.model.ApiMigrateRolesArguments;
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 HostsResourceApi
 */
@Ignore
public class HostsResourceApiTest {

    private final HostsResourceApi api = new HostsResourceApi();

    /**
     * Attach tags to the host.
     *
     * Attach tags to the host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void addTagsTest() throws Exception {
        String hostname = null;
        List<ApiEntityTag> body = null;
        List<ApiEntityTag> response = api.addTags(hostname, body);

        // TODO: test validations
    }
    /**
     * .
     *
     * &lt;p&gt;Create one or more hosts.&lt;/p&gt; &lt;p&gt;You must specify at least the hostname and ipAddress in the request objects. If no hostId is specified, it will be set to the hostname.  It is an error to try and create host with the same hostId as another host.&lt;/p&gt;
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void createHostsTest() throws Exception {
        ApiHostList body = null;
        ApiHostList response = api.createHosts(body);

        // TODO: test validations
    }
    /**
     * Delete all hosts in the system.
     *
     * Delete all hosts in the system
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void deleteAllHostsTest() throws Exception {
        ApiHostList response = api.deleteAllHosts();

        // TODO: test validations
    }
    /**
     * Delete a host from the system.
     *
     * Delete a host from the system
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void deleteHostTest() throws Exception {
        String hostId = null;
        ApiHost response = api.deleteHost(hostId);

        // TODO: test validations
    }
    /**
     * Remove the tags associated with the host.
     *
     * Remove the tags associated with the host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void deleteTagsTest() throws Exception {
        String hostname = null;
        List<ApiEntityTag> body = null;
        List<ApiEntityTag> response = api.deleteTags(hostname, body);

        // TODO: test validations
    }
    /**
     * Put the host into maintenance mode.
     *
     * Put the host into maintenance mode. This is a synchronous command. The result is known immediately upon return.  &lt;p&gt;Available since API v2.&lt;/p&gt;
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void enterMaintenanceModeTest() throws Exception {
        String hostId = null;
        ApiCommand response = api.enterMaintenanceMode(hostId);

        // TODO: test validations
    }
    /**
     * Take the host out of maintenance mode.
     *
     * Take the host out of maintenance mode. This is a synchronous command. The result is known immediately upon return.  &lt;p&gt; Available since API v2. &lt;/p&gt;
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void exitMaintenanceModeTest() throws Exception {
        String hostId = null;
        ApiCommand response = api.exitMaintenanceMode(hostId);

        // TODO: test validations
    }
    /**
     * Generates (or regenerates) a key and certificate for this host if Auto-TLS is enabled.
     *
     * Generates (or regenerates) a key and certificate for this host if Auto-TLS is enabled.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void generateHostCertsTest() throws Exception {
        String hostId = null;
        ApiGenerateHostCertsArguments body = null;
        ApiCommand response = api.generateHostCerts(hostId, body);

        // TODO: test validations
    }
    /**
     * Returns the list of Component details on the requested host.
     *
     * Returns the list of Component details on the requested host.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void getHostComponentsTest() throws Exception {
        String hostId = null;
        List<ApiComponentInfo> response = api.getHostComponents(hostId);

        // TODO: test validations
    }
    /**
     * Fetch metric readings for a host.
     *
     * Fetch metric readings for a host. &lt;p&gt; By default, this call will look up all metrics available for the host. If only specific metrics are desired, use the &lt;i&gt;metrics&lt;/i&gt; parameter. &lt;p&gt; By default, the returned results correspond to a 5 minute window based on the provided end time (which defaults to the current server time). The &lt;i&gt;from&lt;/i&gt; and &lt;i&gt;to&lt;/i&gt; parameters can be used to control the window being queried. A maximum window of 3 hours is enforced. &lt;p&gt; When requesting a \&quot;full\&quot; view, aside from the extended properties of the returned metric data, the collection will also contain information about all metrics available for the role, even if no readings are available in the requested window. &lt;p&gt; Host metrics also include per-network interface and per-storage device metrics. Since collecting this data incurs in more overhead, query parameters can be used to choose which network interfaces and storage devices to query, or to these metrics altogether. &lt;p&gt; Storage metrics are collected at different levels; for example, per-disk and per-partition metrics are available. The \&quot;storageIds\&quot; parameter can be used to filter specific storage IDs. &lt;p&gt; In the returned data, the network interfaces and storage IDs can be identified by looking at the \&quot;context\&quot; property of the metric objects.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void getMetricsTest() throws Exception {
        String hostId = null;
        String from = null;
        List<String> ifs = null;
        List<String> metrics = null;
        Boolean queryNw = null;
        Boolean queryStorage = null;
        List<String> storageIds = null;
        String to = null;
        String view = null;
        ApiMetricList response = api.getMetrics(hostId, from, ifs, metrics, queryNw, queryStorage, storageIds, to, view);

        // TODO: test validations
    }
    /**
     * Puts a set of hosts into Maintenance mode.
     *
     * Puts a set of hosts into Maintenance mode  &lt;p&gt; Available since API v49. Since this is a bulk API, the response may contain partial failures. The returned list contains a list of responses indicating the status of the maintenance mode of the hosts. &lt;/p&gt;
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void hostsEnterMaintenanceModeTest() throws Exception {
        ApiHostNameList body = null;
        ApiHostMaintenanceResponseList response = api.hostsEnterMaintenanceMode(body);

        // TODO: test validations
    }
    /**
     * Migrate roles to a different host.
     *
     * Migrate roles to a different host. &lt;p&gt; This command applies only to HDFS NameNode, JournalNode, and Failover Controller roles. In order to migrate these roles: &lt;ul&gt; &lt;li&gt;HDFS High Availability must be enabled, using quorum-based storage.&lt;/li&gt; &lt;li&gt;HDFS must not be configured to use a federated nameservice.&lt;/li&gt; &lt;/ul&gt; &lt;b&gt;Migrating a NameNode or JournalNode role requires cluster downtime&lt;/b&gt;. HDFS, along with all of its dependent services, will be stopped at the beginning of the migration process, and restarted at its conclusion. &lt;p&gt;If the active NameNode is selected for migration, a manual failover will be performed before the role is migrated. The role will remain in standby mode after the migration is complete. &lt;p&gt;When migrating a NameNode role, the co-located Failover Controller role must be migrated as well if automatic failover is enabled. The Failover Controller role name must be included in the list of role names to migrate specified in the arguments to this command (it will not be included implicitly). This command does not allow a Failover Controller role to be moved by itself, although it is possible to move a JournalNode independently. &lt;p&gt; Available since API v10.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void migrateRolesTest() throws Exception {
        String hostId = null;
        ApiMigrateRolesArguments body = null;
        ApiCommand response = api.migrateRoles(hostId, body);

        // TODO: test validations
    }
    /**
     * Returns a specific Host in the system.
     *
     * Returns a specific Host in the system.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void readHostTest() throws Exception {
        String hostId = null;
        String view = null;
        ApiHost response = api.readHost(hostId, view);

        // TODO: test validations
    }
    /**
     * Retrieves the configuration of a specific host.
     *
     * Retrieves the configuration of a specific host.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void readHostConfigTest() throws Exception {
        String hostId = null;
        String view = null;
        ApiConfigList response = api.readHostConfig(hostId, view);

        // TODO: test validations
    }
    /**
     * Returns hosts in the system filtered by optional host configuration parameters, if specified.
     *
     * Returns hosts in the system filtered by optional host configuration parameters, if specified.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void readHostsTest() throws Exception {
        String configName = null;
        String configValue = null;
        String view = null;
        ApiHostList response = api.readHosts(configName, configValue, view);

        // TODO: test validations
    }
    /**
     * Returns the tags associated with this host.
     *
     * Returns the tags associated with this host. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void readTagsTest() throws Exception {
        String hostname = null;
        java.math.BigDecimal limit = null;
        java.math.BigDecimal offset = null;
        List<ApiEntityTag> response = api.readTags(hostname, limit, offset);

        // TODO: test validations
    }
    /**
     * Performs memory reallocation on set of hosts.
     *
     * Performs memory reallocation on set of hosts
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void reallocateMemoryTest() throws Exception {
        ApiHostNameList body = null;
        ApiGenericResponse response = api.reallocateMemory(body);

        // TODO: test validations
    }
    /**
     * Decommissions and deletes all non management roles from the list of hosts and removes the hosts from the cluster.
     *
     * Decommissions and deletes all non management roles from the list of hosts and removes the hosts from the cluster. Also additionally delete the hosts if deleteHosts is set to true.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void removeHostsFromClusterTest() throws Exception {
        ApiHostsToRemoveArgs body = null;
        ApiCommand response = api.removeHostsFromCluster(body);

        // TODO: test validations
    }
    /**
     * Forces agent on specified host to switch to reporting a different host id.
     *
     * Forces agent on specified host to switch to reporting a different host id.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void resetHostIdTest() throws Exception {
        String hostId = null;
        String newHostId = null;
        ApiCommand response = api.resetHostId(hostId, newHostId);

        // TODO: test validations
    }
    /**
     * .
     *
     * &lt;p&gt;&lt;/p&gt;Gracefully stops all roles that support it; otherwise, performs a simple stop on the provided host.&lt;/p&gt;
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void stopAllRolesOnNodeGracefullyTest() throws Exception {
        String hostname = null;
        ApiCommand response = api.stopAllRolesOnNodeGracefully(hostname);

        // TODO: test validations
    }
    /**
     * .
     *
     * &lt;p&gt;Update an existing host in the system.&lt;/p&gt; &lt;p&gt;Currently, only updating the rackId is supported.  All other fields of the host will be ignored.&lt;/p&gt;
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void updateHostTest() throws Exception {
        String hostId = null;
        ApiHost body = null;
        ApiHost response = api.updateHost(hostId, body);

        // TODO: test validations
    }
    /**
     * Updates the host configuration with the given values.
     *
     * Updates the host configuration with the given values. &lt;p&gt; If a value is set in the given configuration, it will be added to the host&#x27;s configuration, replacing any existing entries. If a value is unset (its value is null), the existing configuration for the attribute will be erased, if any. &lt;p&gt; Attributes that are not listed in the input will maintain their current values in the configuration.
     *
     * @throws Exception
     *          if the Api call fails
     */
    @Test
    public void updateHostConfigTest() throws Exception {
        String hostId = null;
        ApiConfigList body = null;
        String message = null;
        ApiConfigList response = api.updateHostConfig(hostId, body, message);

        // TODO: test validations
    }
}
