option('name') ?? $this->ask(trans('commands.make_node.name')); $data['description'] = $this->option('description') ?? $this->ask(trans('commands.make_node.description')); $data['scheme'] = $this->option('scheme') ?? $this->anticipate( trans('commands.make_node.scheme'), ['https', 'http'], 'https' ); $data['fqdn'] = $this->option('fqdn') ?? $this->ask(trans('commands.make_node.fqdn')); $data['public'] = $this->option('public') ?? $this->confirm(trans('commands.make_node.public'), true); $data['behind_proxy'] = $this->option('proxy') ?? $this->confirm(trans('commands.make_node.behind_proxy')); $data['maintenance_mode'] = $this->option('maintenance') ?? $this->confirm(trans('commands.make_node.maintenance_mode')); $data['memory'] = $this->option('maxMemory') ?? $this->ask(trans('commands.make_node.memory'), '0'); $data['memory_overallocate'] = $this->option('overallocateMemory') ?? $this->ask(trans('commands.make_node.memory_overallocate'), '-1'); $data['disk'] = $this->option('maxDisk') ?? $this->ask(trans('commands.make_node.disk'), '0'); $data['disk_overallocate'] = $this->option('overallocateDisk') ?? $this->ask(trans('commands.make_node.disk_overallocate'), '-1'); $data['cpu'] = $this->option('maxCpu') ?? $this->ask(trans('commands.make_node.cpu'), '0'); $data['cpu_overallocate'] = $this->option('overallocateCpu') ?? $this->ask(trans('commands.make_node.cpu_overallocate'), '-1'); $data['upload_size'] = $this->option('uploadSize') ?? $this->ask(trans('commands.make_node.upload_size'), '256'); $data['daemon_listen'] = $this->option('daemonListeningPort') ?? $this->ask(trans('commands.make_node.daemonListen'), '8080'); $data['daemon_sftp'] = $this->option('daemonSFTPPort') ?? $this->ask(trans('commands.make_node.daemonSFTP'), '2022'); $data['daemon_sftp_alias'] = $this->option('daemonSFTPAlias') ?? $this->ask(trans('commands.make_node.daemonSFTPAlias'), ''); $data['daemon_base'] = $this->option('daemonBase') ?? $this->ask(trans('commands.make_node.daemonBase'), '/var/lib/pelican/volumes'); $node = Node::create($data); $this->line(trans('commands.make_node.success', ['name' => $data['name'], 'id' => $node->id])); } }