Forum Discussion
L4L7_53191
Dec 30, 2010Nimbostratus
Andy: I think you want to create the profile SSL option, then stuff it into a list object to create your 'sequence':
In [18]: opts = ssl.typefactory.create('LocalLB.ProfileSSLOption')
In [19]: opts
Out[19]:
(LocalLB.ProfileSSLOption){
values =
(LocalLB.SSLOptionSequence){
_arrayType = ""
_offset = ""
_id = ""
_href = ""
_arrayType = ""
}
default_flag = None
}
So something like this will work:
opts = ssl.typefactory.create('LocalLB.ProfileSSLOption')
option_list = ssl.typefactory.create('LocalLB.SSLOption') This step is optional, but I wanted to show you that there's a type for the SSL option objects. It's simply an enum.
opts.values = [option_list.SSL_OPTION_EPHEMERAL_RSA] Note that I wrap this up in a list, as specified in the SDK (had to look this up)
ssl.set_ssl_option(['via-pycontrol'], options = [opts])
Now, confirm it all:
ssl.get_ssl_option(['via-pycontrol'])
Out[39]:
[(LocalLB.ProfileSSLOption){
values[] =
"SSL_OPTION_EPHEMERAL_RSA",
default_flag = False
}]
Voila!
HTH,
-Matt