From 45be62f7a77661cc2f898613024ec4567e91b1c5 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 22 Jun 2011 16:21:53 +0200 Subject: [PATCH] Fix constant typo in VirtualNetwork --- src/cli/one_helper/onevnet_helper.rb | 4 ++-- src/oca/ruby/OpenNebula/VirtualNetwork.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cli/one_helper/onevnet_helper.rb b/src/cli/one_helper/onevnet_helper.rb index bd89516c1a..85eab99b8c 100644 --- a/src/cli/one_helper/onevnet_helper.rb +++ b/src/cli/one_helper/onevnet_helper.rb @@ -27,8 +27,8 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper def self.type_to_str(id) id = id.to_i - type_str = VirtualNetwork::VNET_TYPES[id] - return VirtualNetwork::SHORT_VNET_TYPES[type_str] + type_str = VirtualNetwork::VN_TYPES[id] + return VirtualNetwork::SHORT_VN_TYPES[type_str] end private diff --git a/src/oca/ruby/OpenNebula/VirtualNetwork.rb b/src/oca/ruby/OpenNebula/VirtualNetwork.rb index 5500e3f30a..98a999ef1f 100644 --- a/src/oca/ruby/OpenNebula/VirtualNetwork.rb +++ b/src/oca/ruby/OpenNebula/VirtualNetwork.rb @@ -31,9 +31,9 @@ module OpenNebula :chown => "vn.chown" } - NETWORK_TYPES=%w{RANGED FIXED} + VN_TYPES=%w{RANGED FIXED} - SHORT_NETWORK_TYPES={ + SHORT_VN_TYPES={ "RANGED" => "R", "FIXED" => "F" } @@ -144,12 +144,12 @@ module OpenNebula # Returns the type of the Virtual Network (string value) def type_str - NETWORK_TYPES[type] + VN_TYPES[type] end # Returns the state of the Virtual Network (string value) def short_type_str - SHORT_NETWORK_TYPES[type_str] + SHORT_VN_TYPES[type_str] end private