Giter Site home page Giter Site logo

twang2218 / opennebula-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from virtengine/opennebula-go

0.0 2.0 0.0 195 KB

Open Nebula golang API used by VirtEngine

Home Page: https://www.virtengine.com

License: Apache License 2.0

Makefile 3.10% Go 96.90%

opennebula-go's Introduction

================ OpenNebula API

OpenNebula golang API

Example:-

import ( "github.com/megamsys/opennebula-go/api" "github.com/megamsys/opennebula-go/compute" "fmt" ) func main() {

cm := make(map[string]string) cm[api.ENDPOINT] = "http://192.168.0.118:2633/RPC2" cm[api.USERID] = "oneadmin" cm[api.PASSWORD] = "oneadmin"

cl, _ := api.NewClient(cm) v := compute.VirtualMachine { Name: "testmegam4", TemplateName: "megam", Cpu: "1", Memory: "1024", Image: "megam", ClusterId: "100" , T: cl, ContextMap: map[string]string{"assembly_id": "ASM-007", "assemblies_id": "AMS-007", ACCOUNTS_ID: "[email protected]"}, Vnets:map[string]string{"0":"ipv4-pub"}, } //memory in terms of MB! duh!

response, err := v.Create() if err != nil { // handle error }

vmid := response.(string) fmt.Println("VirtualMachine created successfully") }

opennebula-go's People

Contributors

ranjithamca avatar rathishvbr avatar rajesh-rajagopal avatar jaeko44 avatar vinomca-megam avatar

Watchers

James Cloos avatar Tao Wang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.