lib/compute.rb in forj-0.0.11 vs lib/compute.rb in forj-0.0.12
- old
+ new
@@ -12,12 +12,11 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-require 'net/http'
-require 'open-uri'
+require 'require_relative'
require_relative 'connection.rb'
include Connection
module Compute
@@ -46,23 +45,9 @@
if f.name == flavor_name
flavor = f
end
end
flavor
- end
-
- def create_instance(name, flavor_id, image_id, key_name, security_groups, availability_zone, networks)
- server = Connection.compute.servers.create(
- :name => name,
- :flavor_id => flavor_id,
- :image_id => image_id,
- :key_name => key_name,
- :security_groups => [security_groups],
- :availability_zone => availability_zone,
- :networks => [networks],
- :metadata => { :Meta1 => 'MetaValue1'},
- :config_drive => true
- )
end
def delete_instance(maestro)
result = Connection.compute.servers.all(:name => maestro)[0]
name = result.name
\ No newline at end of file