mirror of
https://github.com/openkmip/pykmip
synced 2025-12-15 15:53:36 +00:00
Add optional 'name' argument to create and create_key_pair functions
The ProxyKmipClient now allows you to optionally provide a name when performing a `Create` or a `Create Key Pair`. If not specified, the name is excluded from the request. * For `create`, users specify `name` * For `create_key_pair`, users specify `private_name` and `public_name` Resolves #208
This commit is contained in:
@@ -154,6 +154,9 @@ class Name(Struct):
|
||||
|
||||
@classmethod
|
||||
def create(cls, name_value, name_type):
|
||||
'''
|
||||
Returns a Name object, populated with the given value and type
|
||||
'''
|
||||
if isinstance(name_value, Name.NameValue):
|
||||
value = name_value
|
||||
elif isinstance(name_value, str):
|
||||
@@ -200,6 +203,9 @@ class Name(Struct):
|
||||
else:
|
||||
return NotImplemented
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
|
||||
# 3.3
|
||||
class ObjectType(Enumeration):
|
||||
|
||||
Reference in New Issue
Block a user