Skip to content

Commit 6aef02e

Browse files
authored
resolve documentation error references (#342)
1 parent 00b1e7e commit 6aef02e

File tree

23 files changed

+83
-82
lines changed

23 files changed

+83
-82
lines changed

cterasdk/cio/core/types.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def from_snapshot(snapshot):
4949
@staticmethod
5050
def from_cursor(cursor):
5151
"""
52-
Create Path Object from 'ResourceActionCursor' Class Object.
52+
Create Path Object from :class:`cterasdk.cio.core.types.ResourceActionCursor`.
5353
5454
:param object cursor: Resource Action Cursor Object
5555
"""
@@ -110,7 +110,7 @@ def resolve(path, namespace=None):
110110
Resolve Path
111111
112112
:param object path: Path
113-
:param cterasdk.cio.core.types.PortalPath,optional namespace: Path Object
113+
:param namespace: :class:`cterasdk.cio.core.types.ServicesPortalPath` or :class:`cterasdk.cio.core.types.GlobalAdminPath` (optional)
114114
"""
115115
if isinstance(path, PortalPath):
116116
return path
@@ -133,7 +133,7 @@ def create_generator(paths, namespace=None):
133133
Create Path Object Generator Object.
134134
135135
:param object paths: List or a tuple
136-
:param cterasdk.cio.core.types.PortalPath,optional namespace: Path Object
136+
:param namespace: :class:`cterasdk.cio.core.types.ServicesPortalPath` or :class:`cterasdk.cio.core.types.GlobalAdminPath` (optional)
137137
"""
138138
def wrapper():
139139
for path in paths:
@@ -335,7 +335,7 @@ class PreviousVersion(Object):
335335
Class Representing a Previous Version
336336
337337
:ivar bool current: Current
338-
:ivar cterasdk.cio.types.PortalPath path: Path Object
338+
:ivar path: :class:`cterasdk.cio.types.ServicesPortalPath` or :class:`cterasdk.cio.types.GlobalAdminPath`
339339
:ivar datetime.datetime start_time: Snapshot start time
340340
:ivar datetime.datetime end_time: Snapshot end time
341341
"""
@@ -370,7 +370,7 @@ class PortalResource(BaseResource):
370370
371371
:ivar int,optional id: Resource ID, defaults to ``None`` if not exists
372372
:ivar str name: Resource name
373-
:ivar cterasdk.cio.types.PortalPath path: Path Object
373+
:ivar path: :class:`cterasdk.cio.types.ServicesPortalPath` or :class:`cterasdk.cio.types.GlobalAdminPath`
374374
:ivar bool is_dir: ``True`` if directory, ``False`` otherwise
375375
:ivar bool deleted: ``True`` if deleted, ``False`` otherwise
376376
:ivar int size: Size

cterasdk/core/admins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def list_admins(self, include=None):
4646
4747
:param list[str] include: List of fields to retrieve, defaults to ['name']
4848
:return: Iterator for local administrators
49-
:rtype: cterasdk.lib.iterator.Iterator
49+
:rtype: cterasdk.lib.iterator.QueryIterator
5050
"""
5151
include = union(include or [], Administrators.default)
5252
param = query.QueryParamBuilder().include(include).build()

cterasdk/core/buckets.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ def modify(self, current_name, new_name=None, read_only=None, dedicated_to=None,
101101

102102
def list_buckets(self, include=None):
103103
"""
104-
List Buckets.\n
105-
To retrieve buckets, you must first browse the Global Administration Portal, using: `GlobalAdmin.portals.browse_global_admin()`
106-
104+
List Buckets.
105+
Restricted to the Global Administration Portal. Browse it using :py:func:`cterasdk.core.portals.browse_global_admin`.
107106
:param list[str],optional include: List of fields to retrieve, defaults to ``['name']``
108107
"""
109108
include = union(include or [], Buckets.default)

cterasdk/core/cloudfs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def all(self, filters=None):
516516
:param list[],optional filters: List of additional filters, defaults to None
517517
518518
:return: Iterator for all Zones
519-
:rtype: cterasdk.lib.iterator.Iterator
519+
:rtype: cterasdk.lib.iterator.QueryIterator
520520
"""
521521
builder = query.QueryParamBuilder().include_classname().startFrom(0).countLimit(25)
522522
filters = filters or []
@@ -532,7 +532,7 @@ def search(self, name):
532532
:param str name: Search query
533533
534534
:return: Iterator for all matching Zones
535-
:rtype: cterasdk.lib.iterator.Iterator
535+
:rtype: cterasdk.lib.iterator.QueryIterator
536536
"""
537537
filters = [query.FilterBuilder(Zones.name_attr).like(name)]
538538
return self.all(filters)
@@ -543,7 +543,7 @@ def add(self, name, policy_type=PolicyType.SELECT, description=None):
543543
544544
:param str name: The name of the new zone
545545
:param cterasdk.core.enum.PolicyType,optional policy_type:
546-
Policy type of the new zone, defaults to cterasdk.core.enum.PolicyType.SELECT
546+
Policy type of the new zone, defaults to :py:attr:`cterasdk.core.enum.PolicyType.SELECT`
547547
:param str,optional description: The description of the new zone
548548
"""
549549
param = self._zone_param(name, policy_type, description)

cterasdk/core/devices.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def device(self, device_name, tenant=None, include=None):
3131
:param list[str],optional include: List of fields to retrieve, defaults to ['name', 'portal', 'deviceType']
3232
3333
:return: Managed Device
34-
:rtype: cterasdk.objects.synchronous.Edge or cterasdk.objects.synchronous.Drive
34+
:rtype: cterasdk.objects.synchronous.edge.Edge or cterasdk.objects.synchronous.drive.Drive
3535
"""
3636
include = union(include or [], Devices.default)
3737
include = ['/' + attr for attr in include]
@@ -53,7 +53,7 @@ def filers(self, include=None, allPortals=False, deviceTypes=None):
5353
:param list[cterasdk.core.enum.DeviceType.Gateways] deviceTypes: Types of Filers, defaults to all Filer types
5454
5555
:return: Iterator for all matching Filers
56-
:rtype: cterasdk.lib.iterator.Iterator[cterasdk.object.Gateway.Gateway]
56+
:rtype: cterasdk.lib.iterator.QueryIterator[cterasdk.objects.synchronous.edge.Edge]
5757
"""
5858
if deviceTypes:
5959
deviceTypes = [deviceType for deviceType in deviceTypes if deviceType in DeviceType.Gateways]
@@ -71,7 +71,7 @@ def agents(self, include=None, allPortals=False):
7171
:param bool,optional allPortals: Search in all portals, defaults to False
7272
7373
:return: Iterator for all matching Agents
74-
:rtype: cterasdk.lib.iterator.Iterator[cterasdk.object.Agent.Agent]
74+
:rtype: cterasdk.lib.iterator.QueryIterator[cterasdk.objects.synchronous.drive.Drive]
7575
"""
7676
filters = [query.FilterBuilder(Devices.type_attr).like('Agent')]
7777
return self.devices(include, allPortals, filters)
@@ -84,7 +84,7 @@ def desktops(self, include=None, allPortals=False):
8484
:param bool,optional allPortals: Search in all portals, defaults to False
8585
8686
:return: Iterator for all matching Desktops
87-
:rtype: cterasdk.lib.iterator.Iterator
87+
:rtype: cterasdk.lib.iterator.QueryIterator
8888
"""
8989
filters = [query.FilterBuilder(Devices.type_attr).eq(DeviceType.WorkstationAgent)]
9090
return self.devices(include, allPortals, filters)
@@ -97,7 +97,7 @@ def servers(self, include=None, allPortals=False):
9797
:param bool,optional allPortals: Search in all portals, defaults to False
9898
9999
:return: Iterator for all matching Servers
100-
:rtype: cterasdk.lib.iterator.Iterator
100+
:rtype: cterasdk.lib.iterator.QueryIterator
101101
"""
102102
filters = [query.FilterBuilder(Devices.type_attr).eq(DeviceType.ServerAgent)]
103103
return self.devices(include, allPortals, filters)
@@ -110,7 +110,7 @@ def by_name(self, names, include=None):
110110
:param list[str],optional include: List of fields to retrieve, defaults to ['name', 'portal', 'deviceType']
111111
112112
:return: Iterator for all matching Devices
113-
:rtype: cterasdk.lib.iterator.Iterator
113+
:rtype: cterasdk.lib.iterator.QueryIterator
114114
"""
115115
filters = [query.FilterBuilder('name').eq(name) for name in names]
116116
return self.devices(include, False, filters)
@@ -125,7 +125,7 @@ def devices(self, include=None, allPortals=False, filters=None, user=None):
125125
:param cterasdk.core.types.UserAccount user: User account of the device owner
126126
127127
:return: Iterator for all matching Devices
128-
:rtype: cterasdk.lib.iterator.Iterator
128+
:rtype: cterasdk.lib.iterator.QueryIterator
129129
"""
130130
include = union(include or [], Devices.default)
131131
builder = query.QueryParamBuilder().include(include).allPortals(allPortals)

cterasdk/core/directoryservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def connect(self, domain, username, password, directory=DirectoryServiceType.Mic
3939
:param str username: The user name to use when connecting to the active directory services
4040
:param str password: The password to use when connecting to the active directory services
4141
:param str,optional ou: The OU path to use when connecting to the active directory services, defaults to `None`
42-
:param cterasdk.core.enum.DirectoryServiceType,optional directory: The directory service type, deafults to `'ActiveDirectory'`
42+
:param cterasdk.core.enum.DirectoryServiceType,optional directory: The directory service type, defaults to ``ActiveDirectory``
4343
:param cterasdk.core.types.DomainControllers,optional domain_controllers:
4444
Connect to a primary and a secondary domain controllers, defaults to `None`
4545
:param bool,optional ssl: Connect using SSL, defaults to `False`

cterasdk/core/groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def list_local_groups(self, include=None):
5252
5353
:param list[str] include: List of fields to retrieve, defaults to ['name']
5454
:return: Iterator for all local groups
55-
:rtype: cterasdk.lib.iterator.Iterator
55+
:rtype: cterasdk.lib.iterator.QueryIterator
5656
"""
5757
include = union(include or [], Groups.default)
5858
param = query.QueryParamBuilder().include(include).build()
@@ -65,7 +65,7 @@ def list_domain_groups(self, domain, include=None):
6565
:param str domain: Domain name
6666
:param list[str] include: List of fields to retrieve, defaults to ['name']
6767
:return: Iterator for all the domain groups
68-
:rtype: cterasdk.lib.iterator.Iterator
68+
:rtype: cterasdk.lib.iterator.QueryIterator
6969
"""
7070
include = union(include or [], Groups.default)
7171
param = query.QueryParamBuilder().include(include).build()

cterasdk/core/logs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ def device(self,
3333
Get device logs from the Portal
3434
3535
:param str name: Name of a device
36-
:param cterasdk.core.enum.LogTopic,optional topic: Log topic to get, defaults to cterasdk.core.enum.LogTopic.System
36+
:param cterasdk.core.enum.LogTopic,optional topic: Log topic to get, defaults to :py:attr:`cterasdk.core.enum.LogTopic.System`
3737
:param cterasdk.core.enum.Severity,optional min_severity:
38-
Minimun severity of logs to get, defaults to cterasdk.core.enum.Severity.INFO
38+
Minimun severity of logs to get, defaults to :py:attr:`cterasdk.core.enum.Severity.INFO`
3939
:param str,optional before: Get logs before this date (in format "%m/%d/%Y %H:%M:%S"), defaults to None
4040
:param str,optional after: Get logs after this date (in format "%m/%d/%Y %H:%M:%S"), defaults to None
4141
:param list[cterasdk.core.query.FilterBuilder],optional filters: List of additional filters, defaults to None
4242
4343
:return: Iterator for all matching logs
44-
:rtype: cterasdk.lib.iterator.Iterator[cterasdk.object.Object]
44+
:rtype: cterasdk.lib.iterator.QueryIterator[cterasdk.common.object.Object]
4545
"""
4646
return self.get(topic, min_severity, enum.OriginType.Device, name, before, after, filters)
4747

@@ -54,14 +54,14 @@ def get(self, topic=enum.LogTopic.System, min_severity=enum.Severity.INFO, origi
5454
:param cterasdk.core.enum.Severity,optional min_severity:
5555
Minimun severity of logs to get, defaults to cterasdk.core.enum.Severity.INFO
5656
:param cterasdk.core.enum.OriginType,optional origin_type:
57-
Origin type of the logs to get, defaults to cterasdk.core.enum.OriginType.Portal
57+
Origin type of the logs to get, defaults to :py:attr:`cterasdk.core.enum.OriginType.Portal`
5858
:param str,optional origin: Log origin (e.g. device name, Portal server name), defaults to None
5959
:param str,optional before: Get logs before this date (in format "%m/%d/%Y %H:%M:%S"), defaults to None
6060
:param str,optional after: Get logs after this date (in format "%m/%d/%Y %H:%M:%S"), defaults to None
6161
:param list[cterasdk.core.query.FilterBuilder],optional filters: List of additional filters, defaults to None
6262
6363
:return: Iterator for all matching logs
64-
:rtype: cterasdk.lib.iterator.Iterator[cterasdk.object.Object]
64+
:rtype: cterasdk.lib.iterator.QueryIterator[cterasdk.common.object.Object]
6565
"""
6666
builder = query.QueryParamBuilder().put('topic', topic).put('minSeverity', min_severity)
6767

cterasdk/core/plans.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def by_name(self, names, include=None):
4343
:param list[cterasdk.core.query.FilterBuilder],optional filters: List of additional filters, defaults to None
4444
4545
:return: Iterator for all matching Plans
46-
:rtype: cterasdk.lib.iterator.Iterator
46+
:rtype: cterasdk.lib.iterator.QueryIterator
4747
"""
4848
filters = [query.FilterBuilder('name').eq(name) for name in names]
4949
return self.list_plans(include, filters)
@@ -56,7 +56,7 @@ def list_plans(self, include=None, filters=None):
5656
:param list[],optional filters: List of additional filters, defaults to None
5757
5858
:return: Iterator for all matching Plans
59-
:rtype: cterasdk.lib.iterator.Iterator
59+
:rtype: cterasdk.lib.iterator.QueryIterator
6060
"""
6161
include = union(include or [], Plans.default)
6262
builder = query.QueryParamBuilder().include(include)

cterasdk/core/portals.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ def get(self, name, include=None):
3232

3333
def list_tenants(self, include=None, portal_type=None):
3434
"""
35-
List tenants.\n
36-
To retrieve tenants, you must first browse the Global Administration Portal, using: `GlobalAdmin.portals.browse_global_admin()`
37-
35+
List tenants.
36+
Restricted to the Global Administration Portal. Browse it using :py:func:`cterasdk.core.portals.browse_global_admin`.
3837
:param list[str],optional include: List of fields to retrieve, defaults to ['name']
39-
:param cterasdk.core.enum.PortalType portal_type: The Portal type
38+
:param cterasdk.core.enum.PortalType portal_type: Portal type
4039
"""
4140
# browse administration
4241
include = union(include or [], Portals.default)
@@ -147,7 +146,7 @@ def apply_changes(self, wait=False):
147146
148147
:param bool,optional wait: Wait for all changes to apply
149148
:returns: Task status object, or an awaitable task object
150-
:rtype: cterasdk.common.object.Object or :class:`cterasdk.lib.tasks.AwaitablePortalTask`
149+
:rtype: :py:attr:`cterasdk.common.object.Object` or :class:`cterasdk.lib.tasks.AwaitablePortalTask`
151150
"""
152151
param = Object()
153152
param.objectId = None

0 commit comments

Comments
 (0)