def create_config_file(access_token, ssh_key_path, ssh_user, ssh_port, region, image, size, ssh_key, private_networking, backups_enabled, ip6, timeout)
      # Default SSH Key path
      ssh_key_path = File.join('~', DEFAULT_SSH_KEY_PATH) if ssh_key_path.empty?

      ssh_user = 'root' if ssh_user.empty?

      ssh_port = DEFAULT_SSH_PORT if ssh_port.empty?

      region = DEFAULT_REGION if region.empty?

      image = DEFAULT_IMAGE if image.empty?

      size = DEFAULT_SIZE if size.empty?

      default_ssh_key = DEFAULT_SSH_KEY if ssh_key.empty?

      if private_networking.empty?
        private_networking = DEFAULT_PRIVATE_NETWORKING
      end

      backups_enabled = DEFAULT_BACKUPS_ENABLED if backups_enabled.empty?

      ip6 = DEFAULT_IP6 if ip6.empty?

      timeout = DEFAULT_TIMEOUT if timeout.empty?

      require 'yaml'
      File.open(@path, File::RDWR | File::TRUNC | File::CREAT, 0o600) do |file|
        data = {
          'authentication' => {
            'access_token' => access_token
          },
          'connection' => {
            'timeout' => timeout
          },
          'ssh' => {
            'ssh_user' => ssh_user,
            'ssh_key_path' => ssh_key_path,
            'ssh_port' => ssh_port
          },
          'defaults' => {
            'region' => region,
            'image' => image,
            'size' => size,
            'ssh_key' => ssh_key,
            'private_networking' => private_networking,
            'backups_enabled' => backups_enabled,
            'ip6' => ip6
          }
        }
        file.write data.to_yaml
      end
    end
def create_config_file(access_token, ssh_key_path, ssh_user, ssh_port, region, image, size, ssh_key, private_networking, backups_enabled, ip6, timeout)
      # Default SSH Key path
      ssh_key_path = File.join('~', DEFAULT_SSH_KEY_PATH) if ssh_key_path.empty?

      ssh_user = 'root' if ssh_user.empty?

      ssh_port = DEFAULT_SSH_PORT if ssh_port.empty?

      region = DEFAULT_REGION if region.empty?

      image = DEFAULT_IMAGE if image.empty?

      size = DEFAULT_SIZE if size.empty?

      default_ssh_key = DEFAULT_SSH_KEY if ssh_key.empty?

      if private_networking.empty?
        private_networking = DEFAULT_PRIVATE_NETWORKING
      end

      backups_enabled = DEFAULT_BACKUPS_ENABLED if backups_enabled.empty?

      ip6 = DEFAULT_IP6 if ip6.empty?

      timeout = DEFAULT_TIMEOUT if timeout.empty?

      require 'yaml'
      File.open(@path, File::RDWR | File::TRUNC | File::CREAT, 0o600) do |file|
        data = {
          'authentication' => {
            'access_token' => access_token
          },
          'connection' => {
            'timeout' => timeout
          },
          'ssh' => {
            'ssh_user' => ssh_user,
            'ssh_key_path' => ssh_key_path,
            'ssh_port' => ssh_port
          },
          'defaults' => {
            'region' => region,
            'image' => image,
            'size' => size,
            'ssh_key' => ssh_key,
            'private_networking' => private_networking,
            'backups_enabled' => backups_enabled,
            'ip6' => ip6
          }
        }
        file.write data.to_yaml
      end
    end
Writes a config file