def write_adaptor_config(device, data)
      config_file = config_file(device)
      raise "FATAL: invalid device name of '#{device}' specified for static IP allocation" unless device.match(/eth[0-9+]/)
      logger.info "Writing persistent network configuration to #{config_file}"
      File.open(config_file, "w") { |f| f.write(data) }
    end
def write_adaptor_config(device, data)
      config_file = config_file(device)
      raise "FATAL: invalid device name of '#{device}' specified for static IP allocation" unless device.match(/eth[0-9+]/)
      logger.info "Writing persistent network configuration to #{config_file}"
      File.open(config_file, "w") { |f| f.write(data) }
    end
Persist device config to a file

 If the file does not exist, it will be created.

 === Parameters
 device(String):: target device name
 data(String):: target device config