Пример #1
0
def create_master_profile_instance(masterprofile):
    '''
    Helper method to serialize a dict to a ContainerServiceMasterProfile
    :param: masterprofile: dict with the parameters to setup the ContainerServiceMasterProfile
    :return: ContainerServiceMasterProfile
    '''
    return ContainerServiceMasterProfile(
        count=masterprofile[0]['count'],
        dns_prefix=masterprofile[0]['dns_prefix'])
Пример #2
0
def create_master_profile_instance(masterprofile):
    '''
    Helper method to serialize a dict to a ContainerServiceMasterProfile
    Note: first_consecutive_static_ip is specifically set to None, for Azure server doesn't accept
    request body with this property. This should be an inconsistency bug before Azure client SDK
    and Azure server.
    :param: masterprofile: dict with the parameters to setup the ContainerServiceMasterProfile
    :return: ContainerServiceMasterProfile
    '''
    return ContainerServiceMasterProfile(
        count=masterprofile[0]['count'],
        dns_prefix=masterprofile[0]['dns_prefix'],
        vm_size=masterprofile[0]['vm_size'],
        first_consecutive_static_ip=None)