Sha256: 8aa987326edfabcf5a7aab69005f6f96df394df2cf9bcf5b0afe1ef4950d9395
Contents?: true
Size: 697 Bytes
Versions: 6
Compression:
Stored size: 697 Bytes
Contents
require 'vagrant-conoha/command/openstack_command' module VagrantPlugins module ConoHa 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
6 entries across 6 versions & 1 rubygems