source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/exceptions_spec.rb
Ruby
mit
185
staging
1,329
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::PoolIncompatible do describe described_class do it 'keeps the pool context and exposes a stable message' do pool_migrations = instance_double(OsUp::PoolMigrations, pool: 'tank') error = described_class.new(pool_migrations) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migration_spec.rb
Ruby
mit
185
staging
3,492
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::Migration do def write_migration(dir, dirname, spec: nil) path = File.join(dir, dirname) Dir.mkdir(path) File.write(File.join(path, 'spec.yml'), YAML.dump(spec)) unless spec.nil? path end describe '.load' do it 'loads ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/pool_migrations_spec.rb
Ruby
mit
185
staging
7,115
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::PoolMigrations do def build_migration(id) instance_double(OsUp::Migration, id:, name: "Migration #{id}") end def stub_migration_list(migrations) by_id = migrations.to_h { |migration| [migration.id, migration] } allow(OsUp::Mig...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migration_list_spec.rb
Ruby
mit
185
staging
2,206
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::MigrationList do def create_entry(dir, name, directory: true) path = File.join(dir, name) if directory Dir.mkdir(path) else File.write(path, '') end end it 'loads and sorts visible migration directories by id'...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/system_state_spec.rb
Ruby
mit
185
staging
2,069
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::SystemState do it 'supports the configured snapshot aliases' do state = described_class.new('tank/osctl', 'migration-up', snapshot: %i[conf log hook]) expect(state.instance_variable_get(:@datasets)).to eq( [ 'tank/osctl/...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrator_spec.rb
Ruby
mit
185
staging
11,235
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::Migrator do def build_migration(id, dirname: "#{id}-migration", snapshot: %i[conf], name: "Migration #{id}") instance_double(OsUp::Migration, id:, dirname:, snapshot:, name:) end def build_pool_migrations(all_migrations: [], applied_i...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/cli/app_spec.rb
Ruby
mit
185
staging
1,462
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::Cli::App do it 'returns a configured CLI object' do expect { described_class.get }.not_to raise_error end it 'registers the expected top-level commands' do app = described_class.get top_level = app.commands.keys.map(&:to_s) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/cli/main_spec.rb
Ruby
mit
185
staging
14,579
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::Cli::Main do def build_main_class(**methods) Class.new(described_class) do attr_reader :calls def initialize(*) super @calls = [] end end.tap do |klass| methods.each do |name, body| klas...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/cli/command_spec.rb
Ruby
mit
185
staging
1,195
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::Cli::Command do describe '.run' do let(:klass) do Class.new(described_class) do class << self attr_reader :instances end @instances = [] def initialize(*) super self.cla...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/cli/runner_spec.rb
Ruby
mit
185
staging
2,162
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsUp::Cli::Runner do subject(:command) { build_command(described_class, args:) } let(:args) { [] } after do $MIGRATION_ID = nil $POOL = nil $DATASET = nil $runner_loaded = nil end it 'validates required arguments' do e...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20190408134218_remove_user_datasets_spec.rb
Ruby
mit
185
staging
3,658
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20190408134218-remove-user-datasets migration' do let(:rel_prefix) { 'migrations/20190408134218-remove-user-datasets' } it 'destroys the user dataset during upgrade' do calls = [] zfs = proc do |cmd,...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20220406162532_fix_container_nofile_prlimit_spec.rb
Ruby
mit
185
staging
2,198
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20220406162532-fix-container-nofile-prlimit migration' do let(:rel_prefix) { 'migrations/20220406162532-fix-container-nofile-prlimit' } def conf_mount_zfs(conf_dir) proc do |cmd, opts, target| case...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20190624220030_rename_migrations_to_send_receive_spec.rb
Ruby
mit
185
staging
5,945
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20190624220030-rename-migrations-to-send-receive migration' do let(:rel_prefix) { 'migrations/20190624220030-rename-migrations-to-send-receive' } let(:common_path) { File.join(REPO_ROOT, 'osup', rel_prefix, '...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20190814085557_add_dev_kmsg_spec.rb
Ruby
mit
185
staging
9,258
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20190814085557-add-dev-kmsg migration' do let(:rel_prefix) { 'migrations/20190814085557-add-dev-kmsg' } let(:common_path) { File.join(REPO_ROOT, 'osup', rel_prefix, 'common.rb') } def with_common_loaded(co...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20190408152558_remove_user_ugid_spec.rb
Ruby
mit
185
staging
3,967
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20190408152558-remove-user-ugid migration' do let(:rel_prefix) { 'migrations/20190408152558-remove-user-ugid' } it 'stores the current ugid mapping and removes ugid from user configs during upgrade' do w...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20180711154030_add_netif_routes_spec.rb
Ruby
mit
185
staging
3,500
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20180711154030-add-netif-routes migration' do let(:rel_prefix) { 'migrations/20180711154030-add-netif-routes' } def conf_mount_zfs(conf_dir) proc do |cmd, opts, target| case [cmd, opts, target] ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/spec/osup/migrations/20180825200854_set_ct_dataset_canmount_noauto_spec.rb
Ruby
mit
185
staging
1,656
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/DescribeClass RSpec.describe '20180825200854-set-ct-dataset-canmount-noauto migration' do let(:rel_prefix) { 'migrations/20180825200854-set-ct-dataset-canmount-noauto' } def run_script(rel_path, setting) calls = [] zfs = proc do ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup.rb
Ruby
mit
185
staging
1,370
require 'require_all' module OsUp # Upgrade pool # @param pool [String] # @param opts [Hash] # @option opts [Integer] :to version to upgrade to # @option opts [Boolean] :dry_run def self.upgrade(pool, **opts) pool_migrations = PoolMigrations.new(pool) if !pool_migrations.upgradable? raise Po...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/migration.rb
Ruby
mit
185
staging
1,310
require 'libosctl' module OsUp class Migration attr_reader :id, :path, :dirname, :name, :summary, :description, :snapshot, :export_pool, :stop_containers def self.load(path, dirname) if /^(\d+)-(.+)$/ !~ dirname raise "'#{dirname}' is not a valid migration" end new...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/exceptions.rb
Ruby
mit
185
staging
791
module OsUp class PoolIncompatible < StandardError attr_reader :pool, :pool_migrations def initialize(pool_migrations) @pool = pool_migrations.pool @pool_migrations = pool_migrations super("#{pool} is in an incompatible state and cannot be upgraded") end end class PoolUpToDate < S...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/pool_migrations.rb
Ruby
mit
185
staging
2,813
require 'libosctl' module OsUp class PoolMigrations FILE = '/.migrations'.freeze include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System include OsCtl::Lib::Utils::File # @return [String] attr_reader :pool # @return [String] osctl root dataset on pool attr_reader :dataset ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/system_state.rb
Ruby
mit
185
staging
1,531
require 'libosctl' module OsUp # Preserves system state while a migration is run class SystemState include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System # Create a new system state snapshot def self.create(*, **) s = new(*, **) s.create s end # @param dataset ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/migration_list.rb
Ruby
mit
185
staging
873
require 'singleton' module OsUp class MigrationList include Singleton class << self %i([] each count get).each do |m| define_method(m) do |*args, &block| instance.send(m, *args, &block) end end end def initialize @migrations = [] @index = {} ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/migrator.rb
Ruby
mit
185
staging
5,394
module OsUp class Migrator # Prepare a list of migrations to be run for upgrade # @param pool_migrations [PoolMigrations] # @param opts [Hash] # @option opts [Integer] :to target migration id # @return [Array<Migration>] ordered list of migrations to up def self.upgrade_sequence(pool_migration...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/cli/app.rb
Ruby
mit
185
staging
2,537
require 'gli' module OsUp::Cli class App include GLI::App def self.get cli = new cli.setup cli end def self.run exit(get.run(ARGV)) end def setup Thread.abort_on_exception = true program_desc 'System upgrade manager for vpsAdminOS' version OsUp::V...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/cli/command.rb
Ruby
mit
185
staging
404
require 'libosctl' module OsUp class Cli::Command < OsCtl::Lib::Cli::Command def self.run(klass, method) proc do |global_opts, opts, args| if global_opts[:debug] OsCtl::Lib::Logger.setup(:stdout) else OsCtl::Lib::Logger.setup(:none) end cmd = klass.new(g...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/cli/runner.rb
Ruby
mit
185
staging
380
module OsUp class Cli::Runner < Cli::Command def run require_args!('pool', 'dataset', 'migration dirname', 'action') m = Migration.load(OsUp.migration_dir, args[2]) Process.setproctitle("osup: #{args[0]} #{m.id} #{args[3]}") $MIGRATION_ID = m.id $POOL = args[0] $DATASET = arg...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osup/lib/osup/cli/main.rb
Ruby
mit
185
staging
4,494
require 'libosctl' module OsUp class Cli::Main < Cli::Command include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System def status require_args!(optional: %w[pool]) if args[0] pool_status(args[0]) else global_status end end def check requir...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
tools/osctl-env-exec/osctl-env-exec.gemspec
Ruby
mit
185
staging
1,117
VERSION = '25.11.0'.freeze Gem::Specification.new do |s| s.name = 'osctl-env-exec' s.version = if ENV['OS_BUILD_ID'] "#{VERSION}.build#{ENV['OS_BUILD_ID']}" else VERSION end s.summary = s.description = "Gem for bootstraping Ruby environment wi...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/Gemfile
Ruby
mit
185
staging
297
source 'https://rubygems.org' gemspec if ENV.has_key?('OS_BUILD_ID') source 'https://rubygems.vpsfree.cz' do gem 'libosctl' end else gem 'libosctl', path: '../libosctl' end group :development do gem 'md2man' gem 'rake' gem 'yard' end group :test do gem 'rspec', '~> 3.13' end
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/osctl-exportfs.gemspec
Ruby
mit
185
staging
939
lib = File.expand_path('lib', __dir__) $:.unshift(lib) unless $:.include?(lib) require 'osctl/exportfs/version' Gem::Specification.new do |s| s.name = 'osctl-exportfs' s.version = if ENV['OS_BUILD_ID'] "#{OsCtl::ExportFS::VERSION}.build#{ENV['OS_BUILD_ID']}" else OsCt...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/spec_helper.rb
Ruby
mit
185
staging
754
# frozen_string_literal: true require 'rspec' require 'tmpdir' require 'fileutils' require 'stringio' require 'yaml' require 'json' require 'English' require 'gli' REPO_ROOT = File.expand_path('../..', __dir__) $:.unshift(File.join(REPO_ROOT, 'osctl-exportfs', 'lib')) $:.unshift(File.join(REPO_ROOT, 'libosctl', 'lib...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/bin/osctl_exportfs_spec.rb
Ruby
mit
185
staging
333
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Cli do it 'loads the CLI entrypoint and delegates to Cli.run' do allow(described_class).to receive(:run) load File.join(REPO_ROOT, 'osctl-exportfs', 'bin', 'osctl-exportfs') expect(described_class).to have_received(:ru...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/support/runstate_helpers.rb
Ruby
mit
185
staging
810
# frozen_string_literal: true module RunstateHelpers def stub_exportfs_runstate(root) stub_const('OsCtl::ExportFS::RunState::DIR', root) stub_const('OsCtl::ExportFS::RunState::RUNSVDIR', File.join(root, 'runsvdir')) stub_const('OsCtl::ExportFS::RunState::CURRENT_SERVER', File.join(root, 'current-server')...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/support/cli_command_helpers.rb
Ruby
mit
185
staging
383
# frozen_string_literal: true module CliCommandHelpers def default_gopts { pool: nil, quiet: false, json: false, parsable: false, color: false } end def build_command(klass, args: [], opts: {}, gopts: {}) klass.new(default_gopts.merge(gopts), opts, args) end end RSpe...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/support/process_helpers.rb
Ruby
mit
185
staging
658
# frozen_string_literal: true module ProcessHelpers def build_wait_status(exitstatus) instance_double(Process::Status, exitstatus:, success?: exitstatus == 0) end def stub_pid_signalability(live_pids: [], denied_pids: []) allow(Process).to receive(:kill).with(0, anything) do |_signal, pid| if live...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/support/command_result_helpers.rb
Ruby
mit
185
staging
251
# frozen_string_literal: true module CommandResultHelpers def build_command_result(output:, exitstatus: 0) OsCtl::Lib::SystemCommandResult.new(exitstatus, output) end end RSpec.configure do |config| config.include CommandResultHelpers end
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/erb_template_spec.rb
Ruby
mit
185
staging
1,309
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::ErbTemplate do let(:method_source) do Class.new do def server_name 'gamma' end end.new end it 'renders templates with plain values, procs, and methods' do plain = described_class.render('runsv', ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/cgroup_spec.rb
Ruby
mit
185
staging
2,124
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::CGroup do it 'builds v1 and v2 cgroup paths' do allow(OsCtl::Lib::CGroup).to receive(:v2?).and_return(false) expect(described_class.new('grp').send(:abs_cgroup_path, 'payload')).to eq( '/sys/fs/cgroup/systemd/grp/paylo...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/export_spec.rb
Ruby
mit
185
staging
1,051
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Export do describe '.load' do it 'loads persisted string-keyed hashes' do export = described_class.load( 'dir' => '/srv/data', 'as' => '/exports/data', 'host' => '10.0.0.0/24', 'options' => ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/server_spec.rb
Ruby
mit
185
staging
2,046
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Server do it 'builds host and namespace-relative paths' do with_tmpdir do |tmpdir| prepare_exportfs_runstate(tmpdir) server = described_class.new('srv') expect(server.dir).to eq(File.join(OsCtl::ExportFS::RunS...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/cli/server_spec.rb
Ruby
mit
185
staging
3,497
# frozen_string_literal: true require 'spec_helper' require 'osctl/exportfs/cli' RSpec.describe OsCtl::ExportFS::Cli::Server do subject(:command) { build_command(described_class, args:, opts:) } let(:args) { [] } let(:opts) { {} } before do allow(OsCtl::Lib::Logger).to receive(:setup) end it 'lists...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/cli/app_spec.rb
Ruby
mit
185
staging
3,117
# frozen_string_literal: true require 'spec_helper' require 'osctl/exportfs/cli' RSpec.describe OsCtl::ExportFS::Cli::App do before do allow(OsCtl::Lib::Logger).to receive(:setup) end it 'builds the CLI app with server and export command trees' do app = described_class.new app.setup expect(app...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/cli/export_spec.rb
Ruby
mit
185
staging
2,619
# frozen_string_literal: true require 'spec_helper' require 'osctl/exportfs/cli' RSpec.describe OsCtl::ExportFS::Cli::Export do subject(:command) { build_command(described_class, args:, opts:) } let(:args) { [] } let(:opts) { {} } before do allow(OsCtl::Lib::Logger).to receive(:setup) end it 'lists...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/export/remove_spec.rb
Ruby
mit
185
staging
2,752
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Export::Remove do let(:exports_cfg) { OsCtl::ExportFS::Config::Exports.new([]) } let(:cfg) { instance_double(OsCtl::ExportFS::Config::TopLevel, exports: exports_cfg, save: nil) } let(:server) { instance_double(OsCtl:...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/export/add_spec.rb
Ruby
mit
185
staging
6,113
# frozen_string_literal: true require 'digest' require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Export::Add do let(:exports_cfg) { OsCtl::ExportFS::Config::Exports.new([]) } let(:cfg) { instance_double(OsCtl::ExportFS::Config::TopLevel, exports: exports_cfg, save: nil) } let(:server) do ins...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/runit/generate_spec.rb
Ruby
mit
185
staging
1,968
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Runit::Generate do let(:server) { instance_double(OsCtl::ExportFS::Server, name: 'srv') } let(:config) { instance_double(OsCtl::ExportFS::Config::TopLevel) } it 'renders runit scripts, creates services, and links /s...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/exportfs/generate_spec.rb
Ruby
mit
185
staging
1,001
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Exportfs::Generate do it 'generates the exports file from configured exports' do with_tmpdir do |tmpdir| exports = OsCtl::ExportFS::Config::Exports.new( [ { 'dir' => '/srv/a', ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/delete_spec.rb
Ruby
mit
185
staging
1,979
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Delete do it 'refuses to delete a running server' do with_tmpdir do |tmpdir| prepare_exportfs_runstate(tmpdir) server = OsCtl::ExportFS::Server.new('srv') FileUtils.mkdir_p(server.dir) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/list_spec.rb
Ruby
mit
185
staging
683
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::List do it 'returns an empty list when no servers exist' do with_tmpdir do |tmpdir| prepare_exportfs_runstate(tmpdir) expect(described_class.run).to eq([]) end end it 'returns server obj...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/runsv_spec.rb
Ruby
mit
185
staging
3,401
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Runsv do let(:server) do instance_double( OsCtl::ExportFS::Server, name: 'srv', runsv_dir: '/servers/srv/runsv' ) end let(:cfg) { instance_double(OsCtl::ExportFS::Config::TopLevel, a...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/spawn_spec.rb
Ruby
mit
185
staging
3,965
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Spawn do let(:server) do instance_double( OsCtl::ExportFS::Server, name: 'srv', pid_file: '/run/osctl/exportfs/servers/srv/pid' ) end let(:exports) { instance_double(OsCtl::ExportFS:...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/create_spec.rb
Ruby
mit
185
staging
1,620
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Create do it 'refuses to create an existing server' do with_tmpdir do |tmpdir| prepare_exportfs_runstate(tmpdir) server = OsCtl::ExportFS::Server.new('srv') FileUtils.mkdir_p(server.dir) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/attach_spec.rb
Ruby
mit
185
staging
1,390
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Attach do let(:server) { instance_double(OsCtl::ExportFS::Server, name: 'srv') } before do allow(OsCtl::ExportFS::Server).to receive(:new).with('srv').and_return(server) end it 'runs bash inside the s...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/exec_spec.rb
Ruby
mit
185
staging
2,510
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Exec do let(:server) { instance_double(OsCtl::ExportFS::Server, running?: true, read_pid: 4321) } let(:cgroup) { instance_double(OsCtl::ExportFS::Operations::Server::CGroup, enter_payload: nil) } let(:sys) { ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/configure_spec.rb
Ruby
mit
185
staging
1,508
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::Configure do it 'sets top-level options and persists them' do with_tmpdir do |tmpdir| prepare_exportfs_runstate(tmpdir) server = OsCtl::ExportFS::Server.new('srv') FileUtils.mkdir_p(server.d...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/operations/server/cgroup_spec.rb
Ruby
mit
185
staging
1,420
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Operations::Server::CGroup do let(:server) { instance_double(OsCtl::ExportFS::Server, name: 'srv') } let(:cgroup) { instance_double(OsCtl::ExportFS::CGroup) } before do allow(OsCtl::ExportFS::CGroup).to receive(:new) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/config/exports_spec.rb
Ruby
mit
185
staging
2,233
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Config::Exports do let(:primary_export) do OsCtl::ExportFS::Export.new( dir: '/srv/data', as: '/exports/data', host: '*', options: 'rw' ) end let(:secondary_export) do OsCtl::ExportFS::Export....
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/config/top_level_spec.rb
Ruby
mit
185
staging
2,995
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Config::TopLevel do def build_server(path, name: 'srv') instance_double(OsCtl::ExportFS::Server, name:, config_file: path).tap do |server| allow(server).to receive(:synchronize).and_yield end end it 'uses defaults...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/spec/osctl/exportfs/config/nfsd_spec.rb
Ruby
mit
185
staging
1,022
# frozen_string_literal: true require 'spec_helper' RSpec.describe OsCtl::ExportFS::Config::Nfsd do it 'uses the expected defaults' do cfg = described_class.new({}) expect(cfg.nproc).to eq(8) expect(cfg.tcp).to be(true) expect(cfg.udp).to be(false) expect(cfg.versions).to eq(%w[3 4 4.0 4.1 4.2]...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs.rb
Ruby
mit
185
staging
430
require 'require_all' module OsCtl module ExportFS module Operations module Export; end module Exportfs; end module Runit; end module Server; end end def self.root File.realpath(File.join(__dir__, '..', '..')) end def self.enabled? Dir.exist?(RunState::DIR) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/runstate.rb
Ruby
mit
185
staging
629
module OsCtl::ExportFS module RunState # Root directory for osctl-exportfs DIR = '/run/osctl/exportfs'.freeze # Directory that the host's runsvdir is run with, used for NFS server # services RUNSVDIR = File.join(DIR, 'runsvdir') # Directory with the current server, available only in the serv...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/server.rb
Ruby
mit
185
staging
2,393
require 'filelock' module OsCtl::ExportFS # Represents a NFS server class Server # @return [String] attr_reader :name # Server root directory # @return [String] attr_reader :dir # Directory mounted to /var/lib/nfs # @return [String] attr_reader :nfs_state # Directory used to ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/export.rb
Ruby
mit
185
staging
940
module OsCtl::ExportFS class Export # Directory to export from the host namespace # @return [String] attr_reader :dir # Directory to export in the server namespace # @return [String] attr_reader :as # Mask for hosts that can access this export # @return [String] attr_reader :host...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/erb_template.rb
Ruby
mit
185
staging
1,095
require 'erb' require 'fileutils' module OsCtl::ExportFS class ErbTemplate def self.render(name, vars) t = new(name, vars) t.render end def self.render_to(name, vars, path) File.write("#{path}.new", render(name, vars)) File.rename("#{path}.new", path) end def self.render...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/cgroup.rb
Ruby
mit
185
staging
1,455
require 'fileutils' require 'libosctl' module OsCtl::ExportFS class CGroup FS = '/sys/fs/cgroup'.freeze # @return [String] attr_reader :path # @param path [String] cgroup name def initialize(path) @path = path end # @param name [String] cgroup name def create(name) File...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/config/exports.rb
Ruby
mit
185
staging
1,285
module OsCtl::ExportFS class Config::Exports # @param cfg [Array] def initialize(cfg) @db = cfg.map { |v| Export.load(v) } end # @param export [Export] def <<(export) db << export end # @param as [String] # @param host [String] # @return [Export, nil] def lookup(a...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/config/nfsd.rb
Ruby
mit
185
staging
1,096
module OsCtl::ExportFS class Config::Nfsd VERSIONS = %w[3 4 4.0 4.1 4.2].freeze # @return [Integer, nil] attr_accessor :port # @return [Integer] attr_accessor :nproc # @return [Boolean] attr_accessor :tcp # @return [Boolean] attr_accessor :udp # @return [Array<String>] ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/config/top_level.rb
Ruby
mit
185
staging
1,900
require 'libosctl' module OsCtl::ExportFS class Config::TopLevel include OsCtl::Lib::Utils::File # @return [Server] attr_reader :server # @return [String] attr_reader :path # @return [String] attr_writer :netif # @return [String, nil] attr_accessor :address # @return [Con...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/cli/server.rb
Ruby
mit
185
staging
3,634
require 'osctl/exportfs/cli/command' require 'libosctl' module OsCtl::ExportFS::Cli class Server < Command FIELDS = %i[server state netif address].freeze DEFAULT_NFSD_SWITCHES = { 'nfsd-tcp' => true, 'nfsd-udp' => false, 'nfsd-syslog' => false }.freeze def list if opts[:list]...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/cli/command.rb
Ruby
mit
185
staging
377
require 'libosctl' module OsCtl::ExportFS::Cli class Command < OsCtl::Lib::Cli::Command def self.run(klass, method) proc do |global_opts, opts, args| cmd = klass.new(global_opts, opts, args) cmd.method(method).call end end def initialize(global_opts, opts, args) super ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/cli/export.rb
Ruby
mit
185
staging
1,148
require 'osctl/exportfs/cli/command' module OsCtl::ExportFS::Cli class Export < Command def list servers.each do |s| cfg = s.open_config cfg.exports.each do |ex| puts "server = #{s.name}" puts "dir = #{ex.dir}" puts "as = #{ex.as}" puts "hos...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/cli/app.rb
Ruby
mit
185
staging
5,837
require 'gli' module OsCtl::ExportFS::Cli class App include GLI::App def self.run cli = new cli.setup exit(cli.run(ARGV)) end def setup Thread.abort_on_exception = true program_desc 'Manage dedicated NFS servers for filesystem exports' version OsCtl::ExportFS::V...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/configure.rb
Ruby
mit
185
staging
1,162
require 'fileutils' require 'libosctl' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Change the server configuration class Operations::Server::Configure < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System # @param server [Server] # @param opts [H...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/runsv.rb
Ruby
mit
185
staging
1,600
require 'fileutils' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Manage the system runit service on the host class Operations::Server::Runsv < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System # @param name [String] def initialize(name) su...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/list.rb
Ruby
mit
185
staging
321
require 'osctl/exportfs/operations/base' module OsCtl::ExportFS class Operations::Server::List < Operations::Base def execute ret = [] Dir.entries(RunState::SERVERS).each do |v| next if %w[. ..].include?(v) ret << OsCtl::ExportFS::Server.new(v) end ret end end end
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/exec.rb
Ruby
mit
185
staging
1,661
require 'osctl/exportfs/operations/base' require 'libosctl' module OsCtl::ExportFS # Attach to the server's namespaces and run an arbitrary code block # # A new process is forked and attached to namespaces of the server's init # process. The code block is run in the forked process. class Operations::Server::...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/cgroup.rb
Ruby
mit
185
staging
1,143
require 'osctl/exportfs/operations/base' module OsCtl::ExportFS class Operations::Server::CGroup < Operations::Base PATH = 'osctl/exportfs/server'.freeze # @param server [Server] def initialize(server) super() @server = server @cgroup = OsCtl::ExportFS::CGroup.new(PATH) end de...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/spawn.rb
Ruby
mit
185
staging
8,588
require 'fileutils' require 'libosctl' require 'osctl/exportfs/operations/base' require 'securerandom' module OsCtl::ExportFS # Start a NFS server and wait for it to terminate # # Networking is realized using a pair of veth interfaces -- one on the host # and one in the container. IP addresses of the NFS serve...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/create.rb
Ruby
mit
185
staging
1,404
require 'fileutils' require 'libosctl' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Create the server configuration class Operations::Server::Create < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System # @param name [String] # @param opts [Hash] ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/delete.rb
Ruby
mit
185
staging
1,721
require 'fileutils' require 'libosctl' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Delete NFS server configuration class Operations::Server::Delete < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System # @param name [String] def initialize(name) ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/server/attach.rb
Ruby
mit
185
staging
825
require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Attach to the server's namespaces and run shell class Operations::Server::Attach < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System # @param name [String] def initialize(name) super() @se...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/exportfs/generate.rb
Ruby
mit
185
staging
605
require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Generate exports file from the database for use with exportfs class Operations::Exportfs::Generate < Operations::Base include OsCtl::Lib::Utils::File # @param server [Server] def initialize(server) super() @server = server ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/runit/generate.rb
Ruby
mit
185
staging
1,285
require 'fileutils' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Generate system files for runit # # Note that this operation has to be called from inside the server's mount # namespace. class Operations::Runit::Generate < Operations::Base # @param server [Server] # @param config...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/export/remove.rb
Ruby
mit
185
staging
1,310
require 'fileutils' require 'libosctl' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Remove export from a NFS server class Operations::Export::Remove < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System include OsCtl::Lib::Utils::File # @param ser...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-exportfs/lib/osctl/exportfs/operations/export/add.rb
Ruby
mit
185
staging
2,156
require 'digest' require 'fileutils' require 'libosctl' require 'osctl/exportfs/operations/base' module OsCtl::ExportFS # Add export to a NFS server class Operations::Export::Add < Operations::Base include OsCtl::Lib::Utils::Log include OsCtl::Lib::Utils::System include OsCtl::Lib::Utils::File # @...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/osctl-image.gemspec
Ruby
mit
185
staging
1,036
lib = File.expand_path('lib', __dir__) $:.unshift(lib) unless $:.include?(lib) require 'osctl/image/version' Gem::Specification.new do |s| s.name = 'osctl-image' s.version = if ENV['OS_BUILD_ID'] "#{OsCtl::Image::VERSION}.build#{ENV['OS_BUILD_ID']}" else OsCtl::Image:...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/Gemfile
Ruby
mit
185
staging
388
source 'https://rubygems.org' gemspec if ENV.has_key?('OS_BUILD_ID') source 'https://rubygems.vpsfree.cz' do gem 'libosctl' gem 'osctl' gem 'osctl-repo' end else gem 'libosctl', path: '../libosctl' gem 'osctl', path: '../osctl' gem 'osctl-repo', path: '../osctl-repo' end group :development do ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image.rb
Ruby
mit
185
staging
348
require 'require_all' module OsCtl module Image module Operations module Builder; end module Config; end module Execution; end module File; end module Image; end module Nix; end module Repository; end module Test; end end end end require_rel 'image/*.rb' req...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/test.rb
Ruby
mit
185
staging
319
module OsCtl::Image class Test # @return [String] attr_reader :base_dir # @return [String] attr_reader :name # @param base_dir [String] # @param name [String] def initialize(base_dir, name) @base_dir = base_dir @name = name end def to_s name end end end
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/builder.rb
Ruby
mit
185
staging
1,313
require 'digest' module OsCtl::Image class Builder # @return [String] attr_reader :base_dir # @return [String] attr_reader :ctid # @return [String] attr_reader :name # @return [String] attr_reader :distribution # @return [String] attr_reader :version # @return [String...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/image_list.rb
Ruby
mit
185
staging
264
module OsCtl::Image class ImageList < Array # @param base_dir [String] def initialize(base_dir) super() Operations::Config::ParseList.run(base_dir, :image).each do |name| self << Image.new(base_dir, name) end end end end
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/ip_allocator.rb
Ruby
mit
185
staging
791
require 'ipaddress' module OsCtl::Image # Allocate unique IP addresses from network class IpAllocator # @param addr [String] IPv4 network address def initialize(addr) @available = IPAddress.parse(addr).hosts @taken = {} @mutex = Mutex.new end # @return [IPAddress::IPv4] def g...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/osctld_client.rb
Ruby
mit
185
staging
6,831
require 'osctl' module OsCtl::Image class OsCtldClient def initialize @client = OsCtl::Client.new @connected = false end # Execute multiple commands within one connection def batch opened_before_batch = @connected @batch = true yield(self) ensure @batch = fals...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/image.rb
Ruby
mit
185
staging
1,646
module OsCtl::Image class Image # @return [String] attr_reader :base_dir # @return [String] attr_reader :name # @return [String] attr_reader :builder # @return [String] attr_reader :distribution # @return [String] attr_reader :version # @return [String] attr_reader...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/container_config.rb
Ruby
mit
185
staging
579
module OsCtl::Image class ContainerConfig attr_accessor :distribution, :version, :arch, :vendor, :variant, :dataset, :rootfs def id = nil def user = nil def group = nil def datasets [dataset] + dataset.descendants end def override_with(opts) @overrides = opts end de...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/test_list.rb
Ruby
mit
185
staging
261
module OsCtl::Image class TestList < Array # @param base_dir [String] def initialize(base_dir) super() Operations::Config::ParseList.run(base_dir, :test).each do |name| self << Test.new(base_dir, name) end end end end
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/cli/command.rb
Ruby
mit
185
staging
374
require 'libosctl' module OsCtl::Image::Cli class Command < OsCtl::Lib::Cli::Command def self.run(klass, method) proc do |global_opts, opts, args| cmd = klass.new(global_opts, opts, args) cmd.method(method).call end end def initialize(global_opts, opts, args) super ...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/cli/app.rb
Ruby
mit
185
staging
4,739
require 'gli' module OsCtl::Image::Cli class App include GLI::App def self.run cli = new cli.setup exit(cli.run(ARGV)) end def setup Thread.abort_on_exception = true program_desc 'Build, test and deploy vpsAdminOS images' version OsCtl::Image::VERSION subc...
github
vpsfreecz/vpsadminos
https://github.com/vpsfreecz/vpsadminos
osctl-image/lib/osctl/image/cli/image.rb
Ruby
mit
185
staging
9,629
require 'json' require 'libosctl' require 'osctl/image/cli/command' module OsCtl::Image class Cli::Image < Cli::Command BUILD_SCRIPTS_DIR = '/etc/vpsadminos-image-scripts'.freeze FIELDS = %i[name distribution version arch vendor variant].freeze def list param_selector = OsCtl::Lib::Cli::Parameter...