Sha256: 6e1137e136c01b63713390b90dd3155d792c405990371475f39f43f8491e3dec
Contents?: true
Size: 712 Bytes
Versions: 2
Compression:
Stored size: 712 Bytes
Contents
require 'vagrant-openstack-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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-openstack-provider-0.7.0 | lib/vagrant-openstack-provider/command/subnet_list.rb |
vagrant-openstack-provider-0.6.1 | lib/vagrant-openstack-provider/command/subnet_list.rb |