Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ucsmsdk/mometa/change/ChangeChangedObjectRef.py

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions ucsmsdk/mometa/config/ConfigSorter.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ucsmsdk/mometa/dupe/DupeScope.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ucsmsdk/mometa/fault/FaultAffectedClass.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ucsmsdk/mometa/gmeta/GmetaClass.py

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion ucsmsdk/mometa/gmeta/GmetaProp.py

Large diffs are not rendered by default.

26 changes: 21 additions & 5 deletions ucsmsdk/mometa/observe/ObserveFilter.py

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions ucsmsdk/mometa/security/SecurityAesEncryption.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""This module contains the general information for SecurityAesEncryption ManagedObject."""

from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta


class SecurityAesEncryptionConsts:
IS_PRIMARY_KEY_SET_FALSE = "false"
IS_PRIMARY_KEY_SET_NO = "no"
IS_PRIMARY_KEY_SET_TRUE = "true"
IS_PRIMARY_KEY_SET_YES = "yes"


class SecurityAesEncryption(ManagedObject):
"""This is SecurityAesEncryption class."""

consts = SecurityAesEncryptionConsts()
naming_props = set([])

mo_meta = MoMeta("SecurityAesEncryption", "securityAesEncryption", "aes", VersionMeta.Version435a, "InputOutput", 0x3f, [], ["aaa", "admin"], ['securityEncryptionEp'], [], [None])

prop_meta = {
"child_action": MoPropertyMeta("child_action", "childAction", "string", VersionMeta.Version435a, MoPropertyMeta.INTERNAL, 0x2, None, None, r"""((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1}""", [], []),
"dn": MoPropertyMeta("dn", "dn", "string", VersionMeta.Version435a, MoPropertyMeta.READ_ONLY, 0x4, 0, 256, None, [], []),
"is_primary_key_set": MoPropertyMeta("is_primary_key_set", "isPrimaryKeySet", "string", VersionMeta.Version435a, MoPropertyMeta.READ_ONLY, None, None, None, None, ["false", "no", "true", "yes"], []),
"primary_key": MoPropertyMeta("primary_key", "primaryKey", "string", VersionMeta.Version435a, MoPropertyMeta.READ_WRITE, 0x8, 16, 64, None, [], []),
"rn": MoPropertyMeta("rn", "rn", "string", VersionMeta.Version435a, MoPropertyMeta.READ_ONLY, 0x10, 0, 256, None, [], []),
"sacl": MoPropertyMeta("sacl", "sacl", "string", VersionMeta.Version435a, MoPropertyMeta.READ_ONLY, None, None, None, r"""((none|del|mod|addchild|cascade),){0,4}(none|del|mod|addchild|cascade){0,1}""", [], []),
"status": MoPropertyMeta("status", "status", "string", VersionMeta.Version435a, MoPropertyMeta.READ_WRITE, 0x20, None, None, r"""((removed|created|modified|deleted),){0,3}(removed|created|modified|deleted){0,1}""", [], []),
}

prop_map = {
"childAction": "child_action",
"dn": "dn",
"isPrimaryKeySet": "is_primary_key_set",
"primaryKey": "primary_key",
"rn": "rn",
"sacl": "sacl",
"status": "status",
}

def __init__(self, parent_mo_or_dn, **kwargs):
self._dirty_mask = 0
self.child_action = None
self.is_primary_key_set = None
self.primary_key = None
self.sacl = None
self.status = None

ManagedObject.__init__(self, "SecurityAesEncryption", parent_mo_or_dn, **kwargs)
2 changes: 1 addition & 1 deletion ucsmsdk/mometa/security/SecurityEncryptionEp.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class SecurityEncryptionEp(ManagedObject):
consts = SecurityEncryptionEpConsts()
naming_props = set([])

mo_meta = MoMeta("SecurityEncryptionEp", "securityEncryptionEp", "encryption", VersionMeta.Version435a, "InputOutput", 0x3f, [], ["aaa", "admin"], ['securityEp'], ['eventInst', 'faultInst', 'securityEncryptionEpFsm', 'securityEncryptionEpFsmTask'], [None])
mo_meta = MoMeta("SecurityEncryptionEp", "securityEncryptionEp", "encryption", VersionMeta.Version435a, "InputOutput", 0x3f, [], ["aaa", "admin"], ['securityEp'], ['eventInst', 'faultInst', 'securityAesEncryption', 'securityEncryptionEpFsm', 'securityEncryptionEpFsmTask'], [None])

prop_meta = {
"child_action": MoPropertyMeta("child_action", "childAction", "string", VersionMeta.Version435a, MoPropertyMeta.INTERNAL, 0x2, None, None, r"""((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1}""", [], []),
Expand Down
1 change: 1 addition & 0 deletions ucsmsdk/ucsconstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,6 +1847,7 @@ class NamingId:
QOSCLASS_SLOW_DRAIN_FSM_TASK = "qosclassSlowDrainFsmTask"
QUERYRESULT_DEPENDENCY = "queryresultDependency"
QUERYRESULT_USAGE = "queryresultUsage"
SECURITY_AES_ENCRYPTION = "securityAesEncryption"
SECURITY_ENCRYPTION_EP = "securityEncryptionEp"
SECURITY_ENCRYPTION_EP_FSM = "securityEncryptionEpFsm"
SECURITY_ENCRYPTION_EP_FSM_STAGE = "securityEncryptionEpFsmStage"
Expand Down
23 changes: 16 additions & 7 deletions ucsmsdk/ucsgenutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,33 @@ def download_file(driver, file_url, file_dir, file_name, progress=Progress()):
response = driver.post(uri=file_url, read=False)

if sys.version_info > (3, 0):
# Python 3 code in this block
file_size = int(response.headers['Content-Length'])
content_length = response.headers.get('Content-Length')
else:
# Python 2 code in this block
file_size = int(response.info().getheaders("Content-Length")[0])
headers = response.info().getheaders("Content-Length")
content_length = headers[0] if headers else None

print("Downloading: %s Bytes: %s" % (file_name, file_size))
if content_length:
file_size = int(content_length)
else:
file_size = 0

content_size = 0
file_handle = open(destination_file, 'wb')
block_sz = 64
while True:
r_buffer = response.read(128 * block_sz)
content_size += len(r_buffer)
if not r_buffer:
break

file_handle.write(r_buffer)
progress.update(file_size, len(r_buffer))
print('Downloading Finished.')
if file_size and file_size > 0:
progress.update(file_size, len(r_buffer))
else:
sys.stdout.write("\rDownloading: %s Bytes: %s" % (file_name, content_size))
sys.stdout.flush()

print('\nDownloading Finished.')
file_handle.close()


Expand Down
7 changes: 5 additions & 2 deletions ucsmsdk/ucsmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


def version():
return '6.0(2b)'
return '6.0(2c)'

class VersionMeta:
""" This class contains all the UcsVersion supported by this package."""
Expand Down Expand Up @@ -129,6 +129,7 @@ class VersionMeta:
Version601d = UcsVersion("6.0(1d)")
Version602a = UcsVersion("6.0(2a)")
Version602b = UcsVersion("6.0(2b)")
Version602c = UcsVersion("6.0(2c)")

MO_CLASS_ID = frozenset([
"AaaAuthRealm",
Expand Down Expand Up @@ -1795,6 +1796,7 @@ class VersionMeta:
"QosclassSlowDrainFsmTask",
"QueryresultDependency",
"QueryresultUsage",
"SecurityAesEncryption",
"SecurityEncryptionEp",
"SecurityEncryptionEpFsm",
"SecurityEncryptionEpFsmStage",
Expand Down Expand Up @@ -3851,7 +3853,8 @@ class VersionMeta:
"QosclassSlowDrainFsmTask": MoMeta("QosclassSlowDrainFsmTask", "qosclassSlowDrainFsmTask", "task-[item]", VersionMeta.Version402a, "OutputOnly", 0x1, [], [""], ['qosclassSlowDrain'], [], [None]),
"QueryresultDependency": MoMeta("QueryresultDependency", "queryresultDependency", "dependency-[ref_converted_dn]", VersionMeta.Version221b, "InputOutput", 0x1, [], ["admin"], [], [], [None]),
"QueryresultUsage": MoMeta("QueryresultUsage", "queryresultUsage", "usage-[ref_converted_dn]", VersionMeta.Version221b, "InputOutput", 0x1, [], ["admin"], [], [], [None]),
"SecurityEncryptionEp": MoMeta("SecurityEncryptionEp", "securityEncryptionEp", "encryption", VersionMeta.Version435a, "InputOutput", 0x1, [], ["aaa", "admin"], ['securityEp'], ['eventInst', 'faultInst', 'securityEncryptionEpFsm', 'securityEncryptionEpFsmTask'], [None]),
"SecurityAesEncryption": MoMeta("SecurityAesEncryption", "securityAesEncryption", "aes", VersionMeta.Version435a, "InputOutput", 0x1, [], ["aaa", "admin"], ['securityEncryptionEp'], [], [None]),
"SecurityEncryptionEp": MoMeta("SecurityEncryptionEp", "securityEncryptionEp", "encryption", VersionMeta.Version435a, "InputOutput", 0x1, [], ["aaa", "admin"], ['securityEp'], ['eventInst', 'faultInst', 'securityAesEncryption', 'securityEncryptionEpFsm', 'securityEncryptionEpFsmTask'], [None]),
"SecurityEncryptionEpFsm": MoMeta("SecurityEncryptionEpFsm", "securityEncryptionEpFsm", "fsm", VersionMeta.Version435a, "OutputOnly", 0x1, [], [""], ['securityEncryptionEp'], ['securityEncryptionEpFsmStage'], [None]),
"SecurityEncryptionEpFsmStage": MoMeta("SecurityEncryptionEpFsmStage", "securityEncryptionEpFsmStage", "stage-[name]", VersionMeta.Version435a, "OutputOnly", 0x1, [], [""], ['securityEncryptionEpFsm'], [], [None]),
"SecurityEncryptionEpFsmTask": MoMeta("SecurityEncryptionEpFsmTask", "securityEncryptionEpFsmTask", "task-[item]", VersionMeta.Version435a, "OutputOnly", 0x1, [], [""], ['securityEncryptionEp'], [], [None]),
Expand Down
Loading