Trying to assign a policy to a virtual server
i am trying to change policies on a virtual server, using the python sdk. i load the vs, i can load the existing policy on the vs, and delete it, but when i try to create a new policy for the vs, i get a 404 error saying that the policy cannot be found. ## load the virtual server vs = mgmt.tm.ltm.virtuals.virtual.load(name="serviceMain", partition ="partition", subPath = "subPath") ## load the policy. this works policy = mgmt.tm.ltm.policys.policy.load(name="pol_name", partition ="partition", subPath = "subPath") ## load existing policy from the vs and delete it. this works pol = vs.policies_s.policies.load(name="pol_name", partition ="partition", subPath = "subPath") pol.delete() ## create a new policy. this fails mgmt.tm.ltm.policys.policy.create(name="pol_name", partition ="partition", subPath = "subPath") i get this error: Text: '{"code":404,"message":"01020036:3: The requested policy (pol_name) was not found.","errorStack":[],"apiError":3}' the policy exists, and was loaded earlier in the script, but it can't be found. i have tried other methods of attaching the policy, and they have all failed. any ideas? thanks, -tSolved1.5KViews1like11Comments