def _create_vm_config(self, interface):
        """
        Create the VM config dictionary.

        Requires an existing network interface object.
        """
        # Split image ID into it's components.
        self._process_image_id()

        hardware_profile = {
            'vm_size': self.instance_type or AZURE_DEFAULT_TYPE
        }

        network_profile = {
            'network_interfaces': [{
                'id': interface.id,
                'primary': True
            }]
        }

        storage_profile = self._create_storage_profile()

        os_profile = {
            'computer_name': self.running_instance_id,
            'admin_username': self.ssh_user,
            'linux_configuration': {
                'disable_password_authentication': True,
                'ssh': {
                    'public_keys': [{
                        'path': '/home/{0}/.ssh/authorized_keys'.format(
                            self.ssh_user
                        ),
                        'key_data': self.ssh_public_key
                    }]
                }
            }
        }

        vm_config = {
            'location': self.region,
            'os_profile': os_profile,
            'hardware_profile': hardware_profile,
            'storage_profile': storage_profile,
            'network_profile': network_profile
        }

        return vm_config
def _create_vm_config ( self , interface ) : self . _process_image_id ( ) hardware_profile = { 'vm_size' : self . instance_type or AZURE_DEFAULT_TYPE } network_profile = { 'network_interfaces' : [ { 'id' : interface . id , 'primary' : True } ] } storage_profile = self . _create_storage_profile ( ) os_profile = { 'computer_name' : self . running_instance_id , 'admin_username' : self . ssh_user , 'linux_configuration' : { 'disable_password_authentication' : True , 'ssh' : { 'public_keys' : [ { 'path' : '/home/{0}/.ssh/authorized_keys' . format ( self . ssh_user ) , 'key_data' : self . ssh_public_key } ] } } } vm_config = { 'location' : self . region , 'os_profile' : os_profile , 'hardware_profile' : hardware_profile , 'storage_profile' : storage_profile , 'network_profile' : network_profile } return vm_config
Create the VM config dictionary.

        Requires an existing network interface object.