Skip to content

Instantly share code, notes, and snippets.

@zancas
Created May 18, 2016 17:18
Show Gist options
  • Save zancas/805736447969c4be6ace2c12430010c9 to your computer and use it in GitHub Desktop.
Save zancas/805736447969c4be6ace2c12430010c9 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
class Client_Ssl(Resource):
def __init__(self, client_ssls):
super(Client_Ssl, self).__init__(client_ssls)
self._meta_data['required_json_kind'] =\
'tm:ltm:profile:client-ssl:client-sslstate'
def create(self, name, certname, keyname, **kwargs):
"""Allows creation of SSL profile with just key/cert names
otherwise it will just require 'name' kwarg to be provided
"""
kwargs['name'] = name
kwargs['certKeyChain'] =\
[{'cert': certname, 'key': keyname}]
self._create(**kwargs)
return self
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment