Skip to content

Commit 86eef4a

Browse files
committed
fix example scripts and bump version
1 parent d14aa56 commit 86eef4a

File tree

3 files changed

+16
-26
lines changed

3 files changed

+16
-26
lines changed

examples/02_entity_management.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ def create_entity_examples(j1):
7676
'backupRetentionPeriod': 7,
7777
'tag.Environment': 'production',
7878
'tag.Team': 'data',
79-
'metadata': {
80-
'createdBy': 'terraform',
81-
'lastBackup': '2024-01-01T00:00:00Z',
82-
'maintenanceWindow': 'sun:03:00-sun:04:00'
83-
}
79+
'createdBy': 'terraform',
80+
'lastBackup': '2024-01-01T00:00:00Z',
81+
'maintenanceWindow': 'sun:03:00-sun:04:00'
8482
},
8583
timestamp=int(time.time()) * 1000
8684
)
@@ -122,16 +120,12 @@ def update_entity_examples(j1, entity_id):
122120
entity_id=entity_id,
123121
properties={
124122
'isActive': False,
125-
'maintenanceWindow': {
126-
'start': '2024-01-01T00:00:00Z',
127-
'end': '2024-01-01T04:00:00Z',
128-
'reason': 'scheduled_maintenance'
129-
},
130-
'metadata': {
131-
'maintenancePerformedBy': '[email protected]',
132-
'maintenanceType': 'security_patches',
133-
'estimatedDuration': '4 hours'
134-
}
123+
'maintenanceWindowStart': '2024-01-01T00:00:00Z',
124+
'maintenanceWindowEnd': '2024-01-01T04:00:00Z',
125+
'maintenanceReason': 'scheduled_maintenance',
126+
'maintenancePerformedBy': '[email protected]',
127+
'maintenanceType': 'security_patches',
128+
'estimatedDuration': '4 hours'
135129
}
136130
)
137131
print(f"Updated with complex properties\n")

examples/03_relationship_management.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,9 @@ def create_relationship_examples(j1, from_entity_id, to_entity_id):
100100
'version': '2.1.0',
101101
'installPath': '/usr/local/bin/software',
102102
'permissions': ['read', 'execute'],
103-
'metadata': {
104-
'installer': 'package_manager',
105-
'verified': True,
106-
'checksum': 'sha256:abc123...'
107-
},
103+
'installer': 'package_manager',
104+
'verified': True,
105+
'checksum': 'sha256:abc123...',
108106
'tag.InstallationType': 'automated',
109107
'tag.Verified': 'true'
110108
}
@@ -142,11 +140,9 @@ def update_relationship_examples(j1, relationship_id, from_entity_id, to_entity_
142140
'lastModified': int(time.time()) * 1000,
143141
'modifiedBy': 'security_team',
144142
'expiresOn': int(time.time() + 86400) * 1000, # 24 hours from now
145-
'auditLog': {
146-
'previousLevel': 'write',
147-
'reason': 'promotion_requested',
148-
'approvedBy': 'security_manager'
149-
}
143+
'previousLevel': 'write',
144+
'promotionReason': 'promotion_requested',
145+
'approvedBy': 'security_manager'
150146
}
151147
)
152148
print(f"Updated with complex properties\n")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="jupiterone",
8-
version="2.0.0",
8+
version="2.0.1",
99
description="A Python client for the JupiterOne API",
1010
license="MIT License",
1111
author="JupiterOne",

0 commit comments

Comments
 (0)