NAME
Webservice::OVH::Cloud::Project::Network::Private::Subnet
SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new_from_json("credentials.json");
my $projects = $ovh->cloud->projects;
my $example_project = $projects->[0];
my $networks = $example_project->network->privates;
foreach my $network (@$networks) {
my $subnets = $network->subnets;
foreach my $subnet (@$subnets) {
print $subnet->name;
}
}
DESCRIPTION
Gives access to subnet methods.
METHODS
_new_existing
Internal Method to create the Subnet object. This method is not ment to be called directly.
Parameter: %params - key => value
Return: Webservice::OVH::Cloud::Project::Network::Private::Subnet
Synopsis: Webservice::OVH::Cloud::Project::Network::Private::Subnet->_new(wrapper => $ovh_api_wrapper, project => $project, module => $module, id => $id );
_new_existing
Internal Method to create the Subnet object. This method is not ment to be called directly.
Parameter: %params - key => value
Return: Webservice::OVH::Cloud::Project::Network::Private::Subnet
Synopsis: Webservice::OVH::Cloud::Project::Network::Private::Subnet->_new(wrapper => $ovh_api_wrapper, project => $project, module => $module );
project
Root Project.
Return: Webservice::OVH::Cloud::Project
Synopsis: my $project = $subnet->project;
project
Root Network.
Synopsis: my $project = $subnet->project;
is_valid
When this object is deleted on the api side, this method returns 0.
Return: VALUE
Synopsis: print "Valid" if $subnet->is_valid;
_is_valid
Intern method to check validity. Difference is that this method carps an error.
Return: VALUE
Synopsis: $subnet->_is_valid;
id
Returns the api id
Return: VALUE
Synopsis: my $id = $subnet->id;
gateway_ip
Exposed property value.
Return: VALUE
Synopsis: my $gateway_ip = $subnet->gateway_ip;
cidr
Exposed property value.
Return: VALUE
Synopsis: my $cidr = $subnet->cidr;
ip_pools
Exposed property value.
Return: ARRAY
Synopsis: my $ip_pools = $subnet->ip_pools;
delete
Deletes the object api sided and sets it invalid.
Synopsis: $subnet->delete;