-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathenum.py
More file actions
750 lines (612 loc) · 17.3 KB
/
enum.py
File metadata and controls
750 lines (612 loc) · 17.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
class Context:
"""
Portal connection context
:ivar str admin: Global admin context
:ivar str ServicesPortal: Services Portal context
:ivar str Invitations: Invitations context
"""
admin = 'admin'
ServicesPortal = 'ServicesPortal'
Invitations = 'invitations'
class LogTopic:
"""
Portal Log Topic
:ivar str System: System log topic
:ivar str CloudBackup: Cloud Backup log topic
:ivar str CloudSync: Cloud Sync log topic
:ivar str Access: Access log topic
:ivar str Audit: Audit log topic
"""
System = 'system'
CloudBackup = 'backup'
CloudSync = 'cloudsync'
Access = 'access'
Audit = 'audit'
class OriginType:
"""
Log Origin Type
:ivar str Portal: Portal originated logs
:ivar str Device: Device originated logs
"""
Portal = 'Portal'
Device = 'Device'
class DeviceType:
"""
Device type
:ivar str CloudPlug: Cloud Plug device
:ivar str C200: C200 device
:ivar str C400: C400 device
:ivar str C800: C800 device
:ivar str C800P: C800P device
:ivar str vGateway: vGateway device
:ivar str ServerAgent: Server Agent device
:ivar str WorkstationAgent: Workstation Agent Agent device
:ivar list[str] Gateways: List of all the Gateway DeviceTypes
:ivar list[str] Agents: List of all the Agents DeviceTypes
"""
CloudPlug = "CloudPlug"
C200 = "C200"
C400 = "C400"
C800 = "C800"
C800P = "C800P"
vGateway = "vGateway"
ServerAgent = "Server Agent"
WorkstationAgent = "Workstation Agent"
Gateways = [CloudPlug, C200, C400, C800, C800P, vGateway]
Agents = [ServerAgent, WorkstationAgent]
class Role:
"""
Portal User Role
:ivar str Disabled: Disabled
:ivar str EndUser: End User
:ivar str ReadWriteAdmin: Read Write Administrator
:ivar str ReadOnlyAdmin: Read Only Administrator
:ivar str Support: Support Administrator
"""
Disabled = "Disabled"
EndUser = "EndUser"
ReadWriteAdmin = "ReadWriteAdmin"
ReadOnlyAdmin = "ReadOnlyAdmin"
ComplianceOfficer = "ComplianceOffer"
Support = "Support"
Administrators = [Role.ReadWriteAdmin, Role.ReadOnlyAdmin, Role.ComplianceOfficer, Role.Support]
class RoleResolver:
"""
Role Settings Resolver
:ivar str ReadWriteAdmin: ReadWriteAdmin user role
:ivar str ReadOnlyAdmin: ReadOnlyAdmin user role
:ivar str Support: Support user role
"""
ReadWriteAdmin = "readWriteAdminSettings"
ReadOnlyAdmin = "readOnlyAdminSettings"
Support = "supportAdminSettings"
ComplianceOfficer = 'complianceOfficerSettings'
class Severity:
"""
Portal Log Severity
:ivar str EMERGENCY: Emergency log severity
:ivar str ALERT: Alert log severity
:ivar str CRITICAL: Critical log severity
:ivar str ERROR: Error log severity
:ivar str WARNING: Warning log severity
:ivar str NOTICE: Notice log severity
:ivar str INFO: Info log severity
:ivar str DEBUG: Debug log severity
"""
EMERGENCY = "emergency"
ALERT = "alert"
CRITICAL = "critical"
ERROR = "error"
WARNING = "warning"
NOTICE = "notice"
INFO = "info"
DEBUG = "debug"
class PortalAccountType:
"""
Portal Account Type
:ivar str User: User account type
:ivar str Group: Group account type
"""
User = "user"
Group = "group"
class SearchType:
"""
Search Type
:ivar str User: User search type
:ivar str Group: Group search type
"""
Users = "users"
Groups = "groups"
class PolicyType:
"""
Zone Policy Type
:ivar str ALL: All folders
:ivar str SELECT: Selected Folders
:ivar str NONE: No Folders
"""
ALL = 'allFolders'
SELECT = 'selectedFolders'
NONE = 'noFolders'
class ProtectionLevel:
"""
External Share Protection Level
:ivar str publicLink: No authentication
:ivar str email: 2FA via email
"""
Public = 'publicLink'
Email = 'email'
class FileAccessMode:
"""
Share Access Mode
:ivar str RW: Read Write
:ivar str RO: Read Only
:ivar str PO: Preview Only
:ivar str NA: None
"""
RW = "ReadWrite"
RO = "ReadOnly"
PO = "PreviewOnly"
UO = "UploadOnly"
NA = "None"
class CollaboratorType:
"""
Collaborator Type
:ivar str LU: Local User
:ivar str DU: Domain User
:ivar str LG: Local Group
:ivar str DG: Domain Group
:ivar str EXT: External
"""
LU = "localUser"
LG = "localGroup"
DU = "adUser"
DG = "adGroup"
EXT = "external"
class PortalType:
"""
Portal Type
:ivar str Team: Team Portal
:ivar str Reseller: Reseller Portal
"""
Team = 'team'
Reseller = 'reseller'
class ServerMode:
"""
Portal Server Mode
:ivar str Master: Master
:ivar str Slave: Slave
"""
Master = 'master'
Slave = 'slave'
class SetupWizardStatus:
"""
Portal Setup Wizard Status
:ivar str NA: Not Relevant
:ivar str Running: In Progress
:ivar str Failed: Failed
:ivar str Completed: Completed
"""
NA = "notRelevant"
Running = "inProgress"
Failed = "failed"
Completed = "completed"
class SetupWizardStage:
"""
Portal Setup Wizard Stage
:ivar str Server: Initializing Server
:ivar str Portal: Initializing Portal
:ivar str Restart: Restarting Server
:ivar str Finish: Finished
"""
Server = "initServer"
Portal = "initPortal"
Restart = "restartingServer"
Finish = "finish"
class SlaveAuthenticaionMethod:
"""
Secondary Portal server authentication mode
:ivar str Password: Password
:ivar str PrivateKey: Private Key
"""
Password = 'Password'
PrivateKey = 'Key'
class PlanRetention:
"""
Portal plan retention policy
:ivar str All: All versions
:ivar str Hourly: Hourly versions
:ivar str Daily: Daily versions
:ivar str Weekly: Weekly versions
:ivar str Monthly: Monthly versions
:ivar str Quarterly: Quarterly versions
:ivar str Yearly: Yearly versions
:ivar str Deleted: Recycle bin
"""
All = 'retainAll'
Hourly = 'hourly'
Daily = 'daily'
Weekly = 'weekly'
Monthly = 'monthly'
Quarterly = 'quarterly'
Yearly = 'yearly'
Deleted = 'retainDeleted'
class PlanItem:
"""
Portal plan item
:ivar str EV4: EV4
:ivar str EV8: EV8
:ivar str EV16: EV16
:ivar str EV32: EV32
:ivar str EV64: EV64
:ivar str EV128: EV128
:ivar str WA: Workstation Agent
:ivar str SA: Server Agent
:ivar str Share: Cloud Drive
:ivar str Connect: Cloud Drive Connect
"""
EV4 = 'EV4'
EV8 = 'EV8'
EV16 = 'EV16'
EV32 = 'EV32'
EV64 = 'EV64'
EV128 = 'EV128'
WA = 'WA'
SA = 'SA'
Share = 'Share'
Connect = 'Connect'
Storage = 'Storage'
class PlanService:
"""
Plan Service
:ivar str CloudDrive: Cloud Drive
:ivar str CloudBackup: Cloud Backup
:ivar str Seeding: Seeding
:ivar str Remote: Remote Access
"""
CloudDrive = 'Cloud folders'
CloudBackup = 'Cloud Backup'
Seeding = 'Seeding'
Remote = 'Remote Access'
class PlanServiceState:
"""
Plan Service State
:ivar str Enabled: Enabled
:ivar str Disabled: Disabled
:ivar str Connect: Cloud Drive Connect
"""
Enabled = 'OK'
Disabled = 'Disabled'
Connect = 'Lite'
class ListFilter:
"""
Cloud Drive Folder List Filter
:ivar str All: All
:ivar str Deleted: Deleted
:ivar str NonDeleted: NonDeleted
"""
All = 'All'
Deleted = 'Deleted'
NonDeleted = 'NonDeleted'
class OpenFabricStorageMode:
"""
Fusion Direct storage mode values for :class:`cterasdk.core.fusion_direct.OpenFabricSettingsBuilder`.
Must match the portal schema enum name ``OpenFabricStorageMode`` (legacy identifier).
"""
Filesystem = 'Filesystem'
Bucket = 'Bucket'
Bidirectional = 'Bidirectional'
class PlanCriteria:
"""
Subscription Plan Auto Assignment Rule Builder Criterias
:ivar str Username: Username
:ivar str Groups: User groups
:ivar str Role: User role
:ivar str First: User first name
:ivar str Last: User last name
:ivar str Company: User company
:ivar str BillingId: User billing id
:ivar str Comment: User comment
"""
Username = 'username'
Groups = 'userGroups'
Role = 'role'
First = 'firstName'
Last = 'lastName'
Company = 'company'
BillingId = 'billingId'
Comment = 'comment'
class AntivirusType:
"""
Antivirus Type
:ivar str McAfeeWG: McAfee Web Gateway
:ivar str Symantec: Symantec Protection Engine
:ivar str ESET: ESET Gateway Security
:ivar str Sophos: Sophos AV
:ivar str McAfeeVSES: McAfee VirusScan Enterprise for Storage
:ivar str TrendMicro: Trend Micro InterScan
"""
McAfeeWG = 'McAfee'
Symantec = 'Symantec'
ESET = 'Eset'
Sophos = 'Sophos'
McAfeeVSES = 'McAfeeVSES'
TrendMicro = 'TrendMicro'
class ICAPServices:
"""
ICAP Services
:ivar str Antivirus: Antivirus
:ivar str DLP: Data Loss Prevention
"""
Antivirus = "Antivirus"
DLP = "DLP"
class LocationType:
"""
Location Type
:ivar str Azure: Azure Blob Storage
:ivar str S3: Amazon Web Services S3
:ivar str S3Compatible: S3 Compatible
:ivar str NetAppStorageGRID: NetApp StorageGRID WebScale (S3)
"""
Azure = 'AzureLocation'
S3 = 'S3Location'
S3Compatible = 'S3Compatible'
NetAppStorageGRID = 'NetAppLocation'
class BucketType:
"""
Bucket Type
:ivar str Azure: Azure
:ivar str Scality: Scality
:ivar str AWS: Amazon Web Services S3
:ivar str ICOS: IBM Cloud Object Storage
:ivar str GenericS3: Generic S3
:ivar str Nutanix: Nutanix S3
:ivar str Wasabi: Wasabi S3
:ivar str Google: Google S3
:ivar str NetAppStorageGRID: NetApp StorageGRID WebScale (S3)
"""
Azure = 'Azure'
Scality = 'ScalityS3'
AWS = 'S3'
ICOS = 'CleverSafeS3'
GenericS3 = 'GenericS3'
Nutanix = 'Nutanix'
Wasabi = 'WasabiS3'
Google = 'GoogleS3'
NetAppStorageGRID = 'NTAP'
class EnvironmentVariables:
"""
Environment Variables.\n
Some environment variables are applicable across platforms (i.e. Windows, Linux), while others are limited to a designated platform
:ivar str ALLUSERSPROFILE: All users profile
:ivar str WINDIR: Windows directory
:ivar str TEMP: Temp directory
:ivar str SYSTEMDRIVE: System drive
:ivar str PROGRAMFILES: Program files
:ivar str APPDATA: Application data
:ivar str USERPROFILE: Current user profile
:ivar str PRIMARYUSER: Primary user
:ivar str USERS: Users directory (CTERA Edge Filer)
:ivar str AGENTS: Agents directory (CTERA Edge Filer)
:ivar str SYNCS: Syncs directory (CTERA Edge Filer)
:ivar str PROJECTS: Projects directory (CTERA Edge Filer)
"""
ALLUSERSPROFILE = '$ALLUSERSPROFILE'
WINDIR = '$WINDIR'
TEMP = '$TEMP'
SYSTEMDRIVE = '$SYSTEMDRIVE'
PROGRAMFILES = '$PROGRAMFILES'
APPDATA = '$APPDATA'
USERPROFILE = '$USERPROFILE'
USERS = '$USERS'
AGENTS = '$AGENTS'
SYNCS = '$SYNCS'
PROJECTS = '$PROJECTS'
PRIMARYUSER = '$PRIMARYUSER'
class Platform:
"""
CTERA Edge Platform Type.\n
:ivar str C200_Orion: All users profile
:ivar str C200_ARM: Windows directory
:ivar str C200_Kirkwood: Temp directory
:ivar str C400_C800: System drive
:ivar str Edge_6: CTERA 6.0 Edge Filer
:ivar str Edge_7: CTERA 7.0 Edge Filer
:ivar str Windows: Windows Agent (Drive App)
:ivar str Linux: Linux Agent (Drive App)
:ivar str OSX: Mac Agent (Drive App)
"""
C200_Orion = 'Orion'
C200_ARM = 'ARM'
C200_Kirkwood = 'Kirkwood'
C400_C800 = 'X86'
Edge_6 = 'VBox'
Edge_7 = 'Genesis'
Linux = 'LinuxX86'
Windows = 'WindowsX86'
OSX = 'OSxX86'
class TemplateCriteria:
"""
Configuration Template Auto Assignment Rule Builder Criterias
:ivar str Type: Device type
:ivar str OperatingSystem: Operating system
:ivar str Version: Installed software version
:ivar str Hostname: Hostname
:ivar str Name: Device name
:ivar str Owner: Device owner username
:ivar str Plan: Plan name
:ivar str Groups: Device owner local or domain groups
"""
Type = 'DeviceType'
OperatingSystem = 'OperatingSystem'
Version = 'InstalledSoftwareVersion'
Hostname = 'Hostname'
Name = 'DeviceName'
Owner = 'OwnerUsername'
Plan = 'Plan'
Groups = 'ownerGroups'
class IPProtocol:
"""
IP Protocol
:ivar str TCP: TCP Protocol
:ivar str UDP: UDP Protocol
"""
TCP = "TCP"
UDP = "UDP"
class Mode:
"""
Enum for operational mode
:ivar str Enabled: Operational mode enabled
:ivar str Disabled: Operational mode diabled
"""
Enabled = "enabled"
Disabled = "disabled"
class DirectoryServiceType:
"""
Directory Service Type
:ivar str Microsoft: Active Directory
:ivar str LDAP: LDAP
:ivar str Apple: Apple Open Directory
"""
Microsoft = 'ActiveDirectory'
LDAP = 'LDAP'
Apple = 'AppleOpenDirectory'
class DirectoryServiceFetchMode:
"""
Directory Service Fetch Mode
:ivar str Eager: Eager
:ivar str Lazy: Lazy
"""
Eager = 'Eager'
Lazy = 'Lazy'
class DirectorySearchEntityType:
"""
Directory Search Entity Type
:ivar str User: User
:ivar str Group: Group
"""
User = 'user'
Group = 'group'
class DeduplicationMethodType:
"""
Folder Group Deduplication Method Type
:ivar str AverageBlockSize: AverageBlockSize
:ivar str FixedBlockSize: FixedBlockSize
"""
AverageBlockSize = 'AverageBlockSize'
FixedBlockSize = 'FixedBlockSize'
class RetentionMode:
"""
Write Once Read Many Retention Mode
:ivar str Enterprise: Enterprise
:ivar str Compliance: Compliance
:ivar str Delete: Delete
"""
Delete = 'None'
Enterprise = 'Enterprise'
Compliance = 'Compliance'
class ExtendedAttributes:
"""
Extended Attributes
:ivar str MacOS: MacOS
"""
MacOS = 'MacOS'
class Duration:
"""
Duration
:ivar str Minutes: Minutes
:ivar str Hours: Hours
:ivar str Days: Days
:ivar str Months: Months
:ivar str Years: Years
"""
Minutes = 'Minutes'
Hours = 'Hours'
Days = 'Days'
Months = 'Months'
Years = 'Years'
class Reports:
"""
Reports
:ivar str Storage: Minutes
:ivar str Portals: Hours
:ivar str Folders: Days
:ivar str FolderGroups: Months
"""
Storage = 'storageLocationsStatisticsReport'
Portals = 'portalsStatisticsReport'
Folders = 'foldersStatisticsReport'
FolderGroups = 'folderGroupsStatisticsReport'
class ConflictHandler:
"""
Conflict Handler
:ivar str Skip: Skip.
:ivar str Overwrite: Overwrite target.
:ivar str Rename: Append date to file name.
"""
Skip = 'Skip'
Overwrite = 'Override'
Rename = 'Rename'
class UploadError:
"""
Upload Error
:ivar str UserQuotaViolation: User is out of quota.
:ivar str FolderQuotaViolation: Directory is out of quota.
:ivar str PortalQuotaViolation: Team Portal is out of quota.
:ivar str RejectedByPolicy: Rejected by Cloud Drive policy rule.
:ivar str NoStorageBucket: No available storage bucket.
:ivar str WindowsACL: Illegal access to Windows ACL-enabled cloud drive folder.
"""
FolderQuotaViolation = 'Folder is out of quota'
UserQuotaViolation = 'User is out of quota'
PortalQuotaViolation = 'Portal is out of quota'
RejectedByPolicy = "Rejected by Cloud Drive policy rule"
NoStorageBucket = "No available storage location"
WindowsACL = "Illegal access to NTACL folder"
class ResourceScope:
"""
Resource Scope
:ivar str Root: Root.
:ivar str ProjectsContainer: ProjectsContainer.
:ivar str Project: Project.
:ivar str SharedContainer: SharedContainer.
:ivar str SharedDomain: SharedDomain.
:ivar str Shared: Shared.
:ivar str BackupsContainer: BackupsContainer.
:ivar str Backup: Backup.
:ivar str Personal: Personal.
:ivar str UsersContainer: UsersContainer.
:ivar str UsersFoldersContainer: UsersFoldersContainer.
:ivar str CloudDrivesContainer: CloudDrivesContainer.
:ivar str OfflineFolder: OfflineFolder.
:ivar str InsideCloudFolder: InsideCloudFolder.
"""
Root = "Root"
ProjectsContainer = "ProjectsContainer"
Project = "Project"
SharedContainer = "SharedContainer"
SharedDomain = "SharedDomain"
Shared = "Shared"
BackupsContainer = "BackupsContainer"
Backup = "Backup"
Personal = "Personal"
UsersContainer = "UsersContainer"
UsersFoldersContainer = "UsersFoldersContainer"
CloudDrivesContainer = "CloudDrivesContainer"
OfflineFolder = "OfflineFolder"
InsideCloudFolder = "InsideCloudFolder"
class ResourceError:
"""
Resource Error
:ivar str Conflict: Conflict.
:ivar str PermissionDenied: Permission denied.
:ivar str DestinationNotExists: Path validation error.
:ivar str FileWithTheSameNameExist: File exists.
:ivar str InvalidName: Invalid name.
:ivar str ReservedName: Reserved name.
"""
Conflict = "Conflict"
PermissionDenied = "PermissionDenied"
DestinationNotExists = "DestinationNotExists"
FileWithTheSameNameExist = "FileWithTheSameNameExist"
InvalidName = "InvalidName"
ReservedName = "ReservedName"