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": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "platform": { "$ref": "#/$defs/Platform" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" } }, "$defs": { "Platform": { "description": "Platform.", "enum": [ "WINDOWS", "NI_LINUX_RT" ], "title": "Platform", "type": "string" } }, "required": [ "name", "platform" ] }
- 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": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "platform": { "anyOf": [ { "$ref": "#/$defs/Platform" }, { "type": "null" } ], "default": null }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "updatedAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updatedat" }, "createdAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdat" }, "packageSources": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Packagesources" }, "deleted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deleted" } }, "$defs": { "Platform": { "description": "Platform.", "enum": [ "WINDOWS", "NI_LINUX_RT" ], "title": "Platform", "type": "string" } } }
- 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.
- pydantic model nisystemlink.clients.feeds.models.Package[source]
Package model.
Show JSON schema
{ "title": "Package", "description": "Package model.", "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Id" }, "fileName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Filename" }, "feedId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Feedid" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "updatedAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updatedat" }, "createdAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdat" }, "metadata": { "anyOf": [ { "$ref": "#/$defs/PackageMetadata" }, { "type": "null" } ], "default": null } }, "$defs": { "PackageMetadata": { "description": "Package Meta data.", "properties": { "packageName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Packagename" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Version" }, "architecture": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Architecture" }, "breaks": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Breaks" }, "conflicts": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Conflicts" }, "depends": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Depends" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "enhances": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Enhances" }, "essential": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Essential" }, "fileName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Filename" }, "homepage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Homepage" }, "installedSize": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Installedsize" }, "maintainer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Maintainer" }, "predepends": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Predepends" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Priority" }, "provides": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Provides" }, "recommends": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Recommends" }, "releaseNotes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Releasenotes" }, "replaces": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Replaces" }, "section": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Section" }, "size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Size" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source" }, "suggests": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Suggests" }, "tags": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tags" }, "attributes": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Attributes" } }, "title": "PackageMetadata", "type": "object" } } }
- 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.
- pydantic model nisystemlink.clients.feeds.models.QueryFeedsResponse[source]
Query Feeds response.
Show JSON schema
{ "title": "QueryFeedsResponse", "description": "Query Feeds response.", "type": "object", "properties": { "feeds": { "items": { "$ref": "#/$defs/Feed" }, "title": "Feeds", "type": "array" } }, "$defs": { "Feed": { "description": "Feed model.", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "platform": { "anyOf": [ { "$ref": "#/$defs/Platform" }, { "type": "null" } ], "default": null }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "updatedAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updatedat" }, "createdAt": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdat" }, "packageSources": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Packagesources" }, "deleted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Deleted" } }, "title": "Feed", "type": "object" }, "Platform": { "description": "Platform.", "enum": [ "WINDOWS", "NI_LINUX_RT" ], "title": "Platform", "type": "string" } }, "required": [ "feeds" ] }
- Fields
- field feeds: List[Feed] [Required]
A collection of feeds