Skip to content

contiv/netplugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b91c6e6 · Nov 21, 2016

History

90 Commits
Nov 21, 2016
Jan 18, 2016
Jan 19, 2016
Nov 21, 2016
Jun 10, 2016
Nov 19, 2016
Nov 21, 2016
Jan 18, 2016
Jul 20, 2016
Sep 9, 2016
Jun 10, 2016
Jan 18, 2016
Jul 25, 2016
Aug 10, 2016
Aug 17, 2016
Sep 9, 2016
Sep 5, 2016
Jun 24, 2016
Sep 9, 2016
Jun 10, 2016
Jun 10, 2016

Repository files navigation

GoDoc

Contiv Object Model

This is how current object model looks like:

Contiv Object Model

Using go client

Here is an example of how to use contiv go client

package main

import (
    "log"

    "github.com/contiv/contivModel/client"
)

func main() {
    cl, err := client.NewContivClient("localhost:9999")
    if err != nil {
        log.Fatal(err)
    }
    
    // Define a policy
    policy := client.Policy{
        TenantName: "tenant1",
        PolicyName: "policy",
    }
    
    // Create policy
    err = cl.PostPolicy(policy)
    if err != nil {
        log.Errorf("Policy Creation failed. Err: %v", err)
    }
}