Ruby IControl SOAP::FaultError - virtual server profile already exists in partition
Hello,
First time posting so I hope I can get some help on this. I'm trying to write a basic ruby script to create a Virtual Server and i'm running into this error:
Exception caught in LocalLB::urn:iControl:LocalLB/VirtualServer::create() (SOAP::FaultError) Exception: Common::OperationFailed primary_error_code : 16908390 (0x01020066) secondary_error_code : 0 error_string : 01020066:3: The requested virtual server profile (/test/test2vip.my.domain ) already exists in partition test.
My code basically looks like this:
--snip--
vipDefinition = [ { 'name' => virtual_server_name, 'address' => virtual_server_address, 'port' => virtual_server_port, 'protocol' => virtual_server_protocol } ]
wildmasks = [ '255.255.255.255' ]
resources = [ {'type' => 'RESOURCE_TYPE_POOL' } ]
vsprofile = [ { 'profile_type' => 'PROFILE_TYPE_TCP' , 'profile_context' => 'PROFILE_CONTEXT_TYPE_ALL', 'profile_name' => 'tcp' } ]
f5 = F5::IControl.new(bigip_address,bigip_user,bigip_pass,['Management.Folder','System.Session','LocalLB.VirtualServer']).get_interfaces
f5['LocalLB.VirtualServer'].create(vipDefinition,wildmasks,resources,vsprofile)
--snip--
If i set the profile definition to simply vsprofile = [ {'profile_type' => 'PROFILE_TYPE_TCP' } ] then the error it produces is "The requested profile (/test/) was not found."
I have tried all variation of the profile definition but I can't get the device to create the virtual server. I have tried different names, creating it under the /Common/ partition and the result is the same.
I'm clearly doing something wrong with the virtual server profile. Can someone please help me understand this?
Thank you