Sha256: 004634b9af8d47c9ff3457bbf7af485e1b4ca22f15d6cabf3216e2a64918ae04
Contents?: true
Size: 719 Bytes
Versions: 1
Compression:
Stored size: 719 Bytes
Contents
require 'vagrant-openstack-illuin-provider/command/openstack_command' module VagrantPlugins module Openstack module Command class SubnetList < OpenstackCommand def self.synopsis I18n.t('vagrant_openstack.command.subnet_list_synopsis') end def cmd(name, argv, env) fail Errors::NoArgRequiredForCommand, cmd: name unless argv.size == 0 rows = [] env[:openstack_client].neutron.get_subnets(env).each do |subnet| rows << [subnet.id, subnet.name, subnet.cidr, subnet.enable_dhcp, subnet.network_id] end display_table(env, ['ID', 'Name', 'CIDR', 'DHCP', 'Network ID'], rows) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-openstack-illuin-provider-0.12.0 | lib/vagrant-openstack-illuin-provider/command/subnet_list.rb |