scottdware / go-bigip

A Go package that interacts with F5 BIG-IP systems using the REST API.
MIT License
108 stars 119 forks source link

Attach iRule to Virtual server #30

Open menta2k opened 7 years ago

menta2k commented 7 years ago

Is it possible to attach an iRule to virtual server with your API ?

kenmaglio commented 6 years ago

@Menta2L Yes!

You would have to add the iRules using the AddVirtualServer method and build the structure yourself. So

// Adds VirtualServer with iRules
config := &bigip.VirtualServer{
    Name:      "someVSname",
    Partition: "Common",
    Rules: []string{
        "/Common/Rule1",
        "/Common/Rule2",
    },
}
f5.AddVirtualServer(config)

I believe that should work. @scottdware

scottdware commented 6 years ago

You are right, @kenmaglio