Closed ghost closed 12 years ago
I think it's complaining because servicename is missing, not weight. It seems servicename is required.
On the contrary, when tried giving a servicename it gave me an error saying servicename and servicegroupname both cannot be given...
from nsnitro.nsresources.nslbvserverservicebinding import NSLBVServerServiceBinding
from nsnitro.nsnitro import NSNitro
random_vip = '192.168.8.153' sg = { 'servicegroupname':"Test-SG-%s"%random_vip, 'name':"Test-lbvserver-%s"%random_vip, 'weight':20,
'servicename':'http'
}
nitro_session_obj = NSNitro("10.11.254.30","ddosadmin","ddosAdmin") nitro_session_obj.login() lbbinding = NSLBVServerServiceBinding(sg) print NSLBVServerServiceBinding.add(nitro_session_obj,lbbinding)
Traceback (most recent call last):
File "../ex.py", line 19, in
Am pretty sure* this is more due to some hidden/undocumented link between servicegroup and service ...But can't seem to find it on the NetScaler Documentation...
*-- because the names hint at something..
Hi, can you confirm you can replicate this ? perhaps on the 9.2 LB??
Haven't had the time yet. Will try.
Sent from a mobile device
On 4 jan. 2012, at 17:09, anand jeyahar reply@reply.github.com wrote:
Hi, can you confirm you can replicate this ? perhaps on the 9.2 LB??
Reply to this email directly or view it on GitHub: https://github.com/favoretti/nsnitro/issues/8#issuecomment-3356533
thanks.. ok..
Citrix it's not supported in NetScaler 9.3 .. will close the issue.
Refer citrix Support Request: SR 60689911
I am passing weight value in the following code and still says weight value is missing... Might be a nitro error itself..
from nsnitro.nsresources.nslbvserverservicebinding import NSLBVServerServiceBinding from nsnitro.nsnitro import NSNitro random_vip = '192.168.8.153' sg = { 'servicegroupname':"Test-SG-%s"%random_vip, 'name':"Test-lbvserver-%s"%random_vip, 'weight':20 } nitro_session_obj = NSNitro("10.11.254.30","ddosadmin","ddosAdmin") nitro_session_obj.login() lbbinding = NSLBVServerServiceBinding(sg) print NSLBVServerServiceBinding.add(nitro_session_obj,lbbinding)
gives error:
Traceback (most recent call last): File "../ex.py", line 18, in
print NSLBVServerServiceBinding.add(nitro_session_obj,lbbinding)
File "/usr/local/lib/python2.7/dist-packages/nsnitro-1.0.6-py2.7.egg/nsnitro/nsresources/nslbvserverservicebinding.py", line 179, in add
return __vserver_service_binding.update_resource(nitro)
File "/usr/local/lib/python2.7/dist-packages/nsnitro-1.0.6-py2.7.egg/nsresources/nsbaseresource.py", line 80, in update_resource
response = nitro.put(self.get_put_payload(nitro.get_sessionid()))
File "/usr/local/lib/python2.7/dist-packages/nsnitro-1.0.6-py2.7.egg/nsnitro/nsnitro.py", line 92, in put
raise NSNitroError(nsresponse.message)
nsnitro.nsutil.NSNitroError: u'Argument pre-requisite missing [weight, serviceName]'
Also if i pass both servicegroup and service both, it would be nice to have the python class raise an error before connecting and trying on the NetScaler...