Fix TLS*_METHOD for old pyopenssl releases

The TLS_METHOD constant was introduced in pyopenssl 21.0.0 [0], but some
older Octavia branches (from train to victoria) still use older releases
(19.1.0 for victoria) and then don't support it. Switch back to the
previous the SSL methods if the new constanst doesn't exist.

[0] https://github.com/pyca/pyopenssl/commit/5dc698861c91b4aa83b284b282c0e91cdcee49a3

Change-Id: Ib0eeb1136c168fcc32326f4ed8b008fb7f193a30
1 file changed