nisystemlink.clients.feeds
- class nisystemlink.clients.feeds.FeedsClient(configuration=None)[source]
- __init__(configuration=None)[source]
Initialize an instance.
- Parameters
configuration (
Optional
[nisystemlink.clients.core.HttpConfiguration
]) – Defines the web server to connect to and information about how to connect. If not provided, theHttpConfigurationManager
is used to obtain the configuration.- Raises
ApiException – if unable to communicate with the Feeds Service.
- create_feed(feed)[source]
Create a new feed with the provided feed details.
- Parameters
feeds (models.CreateFeedsRequest) – Request to create the feed.
- Returns
Details of the created feed.
- Return type
- Raises
ApiException – if unable to communicate with the Feeds Service.
- query_feeds(platform=None, workspace=None)[source]
Lists available feeds for the Platform platform under the Workspace workspace.
- Parameters
platform (Optional[models.Platform]) – Information about system platform. Defaults to None.
workspace (Optional[str]) – Workspace id. Defaults to None.
- Returns
List of feeds.
- Return type
List[models.Feed]
- Raises
ApiException – if unable to communicate with the Feeds Service.
- upload_package(feed_id, package_file_path, overwrite=False)[source]
Upload package to SystemLink feed.
- Parameters
feed_id (str) – ID of the feed.
package_file_path (str) – File path of the package to be uploaded.
overwrite (bool) – Set to True, to overwrite the package if it already exists. Defaults to False.
- Returns
Uploaded package information.
- Return type
- Raises
ApiException – if unable to communicate with the Feeds Service.
OSError – if the file does not exist or cannot be opened.
- upload_package_content(feed_id, package, overwrite=False)[source]
Upload package to SystemLink feed.
- Parameters
feed_id (str) – ID of the feed.
package (BinaryIO) – Package file to be uploaded.
overwrite (bool) – Set to True, to overwrite the package if it already exists. Defaults to False.
- Returns
Uploaded package information.
- Return type
- Raises
ApiException – if unable to communicate with the Feeds Service.
- delete_feed(id)[source]
Delete feed and its packages.
- Parameters
id (str) – ID of the feed to be deleted.
- Return type
None
- Returns
None.
- Raises
ApiException – if unable to communicate with the Feeds Service.
- pydantic model nisystemlink.clients.feeds.models.CreateFeedRequest[source]
Create Feed Request.
Show JSON schema
{ "title": "CreateFeedRequest", "description": "Create Feed Request.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "platform": { "$ref": "#/definitions/Platform" }, "workspace": { "title": "Workspace", "type": "string" } }, "required": [ "name", "platform" ], "definitions": { "Platform": { "title": "Platform", "description": "Platform.", "enum": [ "WINDOWS", "NI_LINUX_RT" ] } } }
- Fields
-
field description:
Optional
[str
] = None The description of the feed.
-
field name:
str
[Required] The name of the feed.
-
field platform:
Platform
[Required] The platform of the feed, the following package extensions are available: .nipkg for windows feeds, .ipk and .deb for ni-linux-rt feeds.
-
field workspace:
Optional
[str
] = None The ID of the workspace this feed belongs to. If the workspace is not defined, the default workspace is used.
- pydantic model nisystemlink.clients.feeds.models.Feed[source]
Feed model.
Show JSON schema
{ "title": "Feed", "description": "Feed model.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "platform": { "$ref": "#/definitions/Platform" }, "workspace": { "title": "Workspace", "type": "string" }, "updatedAt": { "title": "Updatedat", "type": "string", "format": "date-time" }, "createdAt": { "title": "Createdat", "type": "string", "format": "date-time" }, "packageSources": { "title": "Packagesources", "type": "array", "items": { "type": "string" } }, "deleted": { "title": "Deleted", "type": "boolean" } }, "definitions": { "Platform": { "title": "Platform", "description": "Platform.", "enum": [ "WINDOWS", "NI_LINUX_RT" ] } } }
-
field created_at:
Optional
[datetime
] = None The date when the feed was created at.
-
field deleted:
Optional
[bool
] = None Whether the feed deletion was requested.
-
field description:
Optional
[str
] = None The description of the feed.
-
field id:
Optional
[str
] = None The auto-generated ID of the feed.
-
field name:
Optional
[str
] = None The name of the feed.
-
field package_sources:
Optional
[List
[str
]] = None The package sources list of the feed.
-
field platform:
Optional
[Platform
] = None The platform of the feed, the following package extensions are available: .nipkg for windows feeds, .ipk and .deb for ni-linux-rt feeds.
-
field updated_at:
Optional
[datetime
] = None The date of the latest feed update
-
field workspace:
Optional
[str
] = None The ID of the workspace this feed belongs to.
-
field created_at:
- pydantic model nisystemlink.clients.feeds.models.Package[source]
Package model.
Show JSON schema
{ "title": "Package", "description": "Package model.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "fileName": { "title": "Filename", "type": "string" }, "feedId": { "title": "Feedid", "type": "string" }, "workspace": { "title": "Workspace", "type": "string" }, "updatedAt": { "title": "Updatedat", "type": "string", "format": "date-time" }, "createdAt": { "title": "Createdat", "type": "string", "format": "date-time" }, "metadata": { "$ref": "#/definitions/PackageMetadata" } }, "definitions": { "PackageMetadata": { "title": "PackageMetadata", "description": "Package Meta data.", "type": "object", "properties": { "packageName": { "title": "Packagename", "type": "string" }, "version": { "title": "Version", "type": "string" }, "architecture": { "title": "Architecture", "type": "string" }, "breaks": { "title": "Breaks", "type": "array", "items": { "type": "string" } }, "conflicts": { "title": "Conflicts", "type": "array", "items": { "type": "string" } }, "depends": { "title": "Depends", "type": "array", "items": { "type": "string" } }, "description": { "title": "Description", "type": "string" }, "enhances": { "title": "Enhances", "type": "array", "items": { "type": "string" } }, "essential": { "title": "Essential", "type": "boolean" }, "fileName": { "title": "Filename", "type": "string" }, "homepage": { "title": "Homepage", "type": "string" }, "installedSize": { "title": "Installedsize", "type": "integer" }, "maintainer": { "title": "Maintainer", "type": "string" }, "predepends": { "title": "Predepends", "type": "array", "items": { "type": "string" } }, "priority": { "title": "Priority", "type": "integer" }, "provides": { "title": "Provides", "type": "array", "items": { "type": "string" } }, "recommends": { "title": "Recommends", "type": "array", "items": { "type": "string" } }, "releaseNotes": { "title": "Releasenotes", "type": "string" }, "replaces": { "title": "Replaces", "type": "array", "items": { "type": "string" } }, "section": { "title": "Section", "type": "string" }, "size": { "title": "Size", "type": "integer" }, "source": { "title": "Source", "type": "string" }, "suggests": { "title": "Suggests", "type": "array", "items": { "type": "string" } }, "tags": { "title": "Tags", "type": "string" }, "attributes": { "title": "Attributes", "type": "object", "additionalProperties": { "type": "string" } } } } } }
-
field created_at:
Optional
[datetime
] = None The date when the package was created at.
-
field feed_id:
Optional
[str
] = None The ID of the feed this package is associated with.
-
field file_name:
Optional
[str
] = None The name of the file in this package.
-
field id:
Optional
[str
] = None Gets or sets the ID of this package. This is used to reference this package in the service.
-
field metadata:
Optional
[PackageMetadata] = None Package meta data.
-
field updated_at:
Optional
[datetime
] = None The date of the latest package update.
-
field workspace:
Optional
[str
] = None The ID of the workspace this package belongs to. The workspace of a package is the workspace of feed this package is associated with.
-
field created_at:
- pydantic model nisystemlink.clients.feeds.models.QueryFeedsResponse[source]
Query Feeds response.
Show JSON schema
{ "title": "QueryFeedsResponse", "description": "Query Feeds response.", "type": "object", "properties": { "feeds": { "title": "Feeds", "type": "array", "items": { "$ref": "#/definitions/Feed" } } }, "required": [ "feeds" ], "definitions": { "Platform": { "title": "Platform", "description": "Platform.", "enum": [ "WINDOWS", "NI_LINUX_RT" ] }, "Feed": { "title": "Feed", "description": "Feed model.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "platform": { "$ref": "#/definitions/Platform" }, "workspace": { "title": "Workspace", "type": "string" }, "updatedAt": { "title": "Updatedat", "type": "string", "format": "date-time" }, "createdAt": { "title": "Createdat", "type": "string", "format": "date-time" }, "packageSources": { "title": "Packagesources", "type": "array", "items": { "type": "string" } }, "deleted": { "title": "Deleted", "type": "boolean" } } } } }
- Fields