# Path: acos_client/errors.py
# class RequiredAttributeNotSpecified(Exception):
# class ACOSException(Exception):
# class ACOSUnsupportedVersion(ACOSException):
# class ACOSUnknownError(ACOSException):
# class AddressSpecifiedIsInUse(ACOSException):
# class AuthenticationFailure(ACOSException):
# class InvalidSessionID(ACOSException):
# class Exists(ACOSException):
# class NotFound(ACOSException):
# class NoSuchServiceGroup(ACOSException):
# class NotImplemented(ACOSException):
# class InUse(ACOSException):
# class InvalidPartitionParameter(ACOSException):
# class MemoryFault(ACOSException):
# class InvalidParameter(ACOSException):
# class OutOfPartitions(ACOSException):
# class PartitionIdExists(ACOSException):
# class HMMissingHttpPassive(ACOSException):
# class AxapiJsonFormatError(ACOSException):
# class ConfigManagerNotReady(ACOSException):
# class DhcpAcquireFailed(ACOSException):
# class InvalidInteger(ACOSException):
# class CertificateParsingFailed(ACOSException):
# class KeyParsingFailed(ACOSException):
# class FeatureNotSupported(ACOSException):
# class ACOSSystemNotReady(ACOSException):
# class ACOSSystemIsBusy(ACOSException):
# class LicenseOptionNotAllowed(ACOSException):
#     def __init__(self, url, attribute, requires=[]):
#     def __init__(self, code=1, msg=''):
#     def __str__(self):
# 
# Path: acos_client/v30/base.py
# class BaseV30(object):
#     def __init__(self, client):
#     def minimal_dict(self, my_dict, exclude=[]):
#     def url(self, action):
#     def _request(self, method, action, params, retry_count=0, max_retries=None,
#                  timeout=None, axapi_args=None, **kwargs):
#     def _get(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _post(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _put(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _delete(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _is_ipv6(self, ip_address):


from acos_client import errors as acos_errors
from acos_client.v30 import base
            params['monitor']['method'][mon_method][k] = int(port)
            params['monitor']['override-port'] = int(port)
        # handle POST case for HTTP/HTTPS hm
        if ('url-type' in params['monitor']['method'][mon_method] and
                'url-path' in params['monitor']['method'][mon_method] and
                params['monitor']['method'][mon_method]['url-type'] == "POST"):
            if post_data:
                params['monitor']['method'][mon_method]['post-type'] = "postdata"
                if mon_method == self.HTTPS:
                    params['monitor']['method'][mon_method]['https-postdata'] = str(post_data)
                else:
                    params['monitor']['method'][mon_method]['http-postdata'] = str(post_data)
                postpath = params['monitor']['method'][mon_method]['url-path']
                params['monitor']['method'][mon_method]['post-path'] = postpath
                params['monitor']['method'][mon_method].pop('url-path', None)
        else:
            params['monitor']['method'][mon_method].pop('post-type', None)
            params['monitor']['method'][mon_method].pop('http-postdata', None)
            params['monitor']['method'][mon_method].pop('post-path', None)

        return params

    def create(self, name, mon_type, hm_interval, hm_timeout, hm_max_retries,
               method=None, url=None, expect_code=None, port=None, ipv4=None, post_data=None,
               max_retries=None, timeout=None, **kwargs):
        try:
            self.get(name)
        except acos_errors.NotFound:
            pass
        else:

# Path: acos_client/errors.py
# class RequiredAttributeNotSpecified(Exception):
# class ACOSException(Exception):
# class ACOSUnsupportedVersion(ACOSException):
# class ACOSUnknownError(ACOSException):
# class AddressSpecifiedIsInUse(ACOSException):
# class AuthenticationFailure(ACOSException):
# class InvalidSessionID(ACOSException):
# class Exists(ACOSException):
# class NotFound(ACOSException):
# class NoSuchServiceGroup(ACOSException):
# class NotImplemented(ACOSException):
# class InUse(ACOSException):
# class InvalidPartitionParameter(ACOSException):
# class MemoryFault(ACOSException):
# class InvalidParameter(ACOSException):
# class OutOfPartitions(ACOSException):
# class PartitionIdExists(ACOSException):
# class HMMissingHttpPassive(ACOSException):
# class AxapiJsonFormatError(ACOSException):
# class ConfigManagerNotReady(ACOSException):
# class DhcpAcquireFailed(ACOSException):
# class InvalidInteger(ACOSException):
# class CertificateParsingFailed(ACOSException):
# class KeyParsingFailed(ACOSException):
# class FeatureNotSupported(ACOSException):
# class ACOSSystemNotReady(ACOSException):
# class ACOSSystemIsBusy(ACOSException):
# class LicenseOptionNotAllowed(ACOSException):
#     def __init__(self, url, attribute, requires=[]):
#     def __init__(self, code=1, msg=''):
#     def __str__(self):
# 
# Path: acos_client/v30/base.py
# class BaseV30(object):
#     def __init__(self, client):
#     def minimal_dict(self, my_dict, exclude=[]):
#     def url(self, action):
#     def _request(self, method, action, params, retry_count=0, max_retries=None,
#                  timeout=None, axapi_args=None, **kwargs):
#     def _get(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _post(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _put(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _delete(self, action, params={}, max_retries=None, timeout=None, axapi_args=None, **kwargs):
#     def _is_ipv6(self, ip_address):


# Path: acos_client/v30/slb/hm.py
from acos_client import errors as acos_errors
from acos_client.v30 import base

            params['monitor']['method'][mon_method][k] = int(port)
            params['monitor']['override-port'] = int(port)
        # handle POST case for HTTP/HTTPS hm
        if ('url-type' in params['monitor']['method'][mon_method] and
                'url-path' in params['monitor']['method'][mon_method] and
                params['monitor']['method'][mon_method]['url-type'] == "POST"):
            if post_data:
                params['monitor']['method'][mon_method]['post-type'] = "postdata"
                if mon_method == self.HTTPS:
                    params['monitor']['method'][mon_method]['https-postdata'] = str(post_data)
                else:
                    params['monitor']['method'][mon_method]['http-postdata'] = str(post_data)
                postpath = params['monitor']['method'][mon_method]['url-path']
                params['monitor']['method'][mon_method]['post-path'] = postpath
                params['monitor']['method'][mon_method].pop('url-path', None)
        else:
            params['monitor']['method'][mon_method].pop('post-type', None)
            params['monitor']['method'][mon_method].pop('http-postdata', None)
            params['monitor']['method'][mon_method].pop('post-path', None)

        return params

    def create(self, name, mon_type, hm_interval, hm_timeout, hm_max_retries,
               method=None, url=None, expect_code=None, port=None, ipv4=None, post_data=None,
               max_retries=None, timeout=None, **kwargs):
        try:
            self.get(name)
        except acos_errors.NotFound:
            pass
        else:

            raise acos_errors.Exists()