# coding: utf-8

"""
    VNS3 Controller API

    Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge  # noqa: E501

    The version of the OpenAPI document: 4.8
    Contact: solutions@cohesive.net
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import pytest

from tests.rest_mock import RestClientMock

from cohesivenet import VNS3Client, models, Configuration
from cohesivenet.rest import ApiException


class TestHighAvailabilityApi(object):
    """HighAvailabilityApi unit test stubs"""

    def test_get_ha_id(self, rest_mock: RestClientMock):
        """Test case for get_ha_id

        """
        mock_uuid = "4902a793073191235f83ae25c83a596b4277c8a6c909ecf9551ce8cd3189b12d"
        rest_mock.stub_request(
            "get", "/api/ha/uuid", {"response": {"ha_uuid": mock_uuid}}
        )

        api_client = VNS3Client(
            configuration=Configuration(
                host="0.0.0.0:8000",
                username="api",
                password="password",
                verify_ssl=False,
            )
        )

        resp = api_client.high_availability.get_ha_id()
        assert type(resp) is models.HaUUID
        assert resp.response.ha_uuid == mock_uuid

    def test_get_ha_status_uninitialized(self, rest_mock: RestClientMock):
        """Test case for get_ha_status

        """
        method, uri = "get", "/api/ha/status"
        mock_uuid = "4902a793073191235f83ae25c83a596b4277c8a6c909ecf9551ce8cd3189b12d"
        rest_mock.stub_request(
            method,
            uri,
            {"response": {"type": "backup_server", "status": "Not initialised"}},
        )

        api_client = VNS3Client(
            configuration=Configuration(
                host="0.0.0.0:8000",
                username="api",
                password="password",
                verify_ssl=False,
            )
        )

        resp = api_client.high_availability.get_ha_status(mock_uuid)
        assert type(resp) is models.HaDetail
        assert resp.response.type == "backup_server"
        assert resp.response.status == "Not initialised"
        rest_mock.assert_requested(method, uri, query_params=[("uuid", mock_uuid)])

    @pytest.mark.licensed
    def test_get_ha_sync_file(self, rest_mock: RestClientMock):
        """Test case for get_ha_sync_file

        """
        pass

    @pytest.mark.licensed
    def test_get_ha_sync_status(self, rest_mock: RestClientMock):
        """Test case for get_ha_sync_status

        """
        pass

    def test_post_init_ha(self, rest_mock: RestClientMock):
        """Test case for post_init_ha

        """
        pass

    @pytest.mark.licensed
    def test_post_sync_ha(self, rest_mock: RestClientMock):
        """Test case for post_sync_ha

        """
        pass

    def test_put_ha_activate(self, rest_mock: RestClientMock):
        """Test case for put_ha_activate

        """
        pass

    def test_put_ha_push_file(self, rest_mock: RestClientMock):
        """Test case for put_ha_push_file

        """
        pass
