Skip to content

Commit

Permalink
Catalog subscription (#511)
Browse files Browse the repository at this point in the history
* Improve task comments and error messages
* Add functions to handle lists of tasks
    * ResourceInProgress and ResourceComplete check whether a set of tasks for a given resource is in progress
    * SkimTasksList and client.SkimTasksList remove completed tasks from a list
    * WaitTaskListCompletion and WaitTaskListCompletionMonitor wait for the completion of a list of tasks
    * client.GetTaskByHREF and client.GetTaskById retrieve a single task by ID or HREF
* Add Mime constant for Media Item
* Update ExternalCatalogSubscription struct
    * Fix field order
    * Fix ExpectedSslThumbprint type (string, not bool)
* Add task monitoring function MinimalShowTask
* Add methods to retrieve and sync catalog items
* Add functions to subscribe and sync admin catalogs
* Add complete catalog subscription test
* Fix minor staticcheck issues
* Add changelog item
* Add method AdminCatalog.UpdateSubscriptionParams
* Add task query elements
* Add task management functions
    Many catalog subscription ops require task management fine tuning
* Upgrade Go requirement to 1.19
    This upgrade is needed by the usage of `url.JoinPath`, which was
    introduced in Go 1.19
* Add go version requirement to gosec action

Signed-off-by: Giuseppe Maxia <[email protected]>
  • Loading branch information
dataclouder authored Nov 14, 2022
1 parent 017338b commit b6a9b94
Show file tree
Hide file tree
Showing 15 changed files with 1,608 additions and 60 deletions.
24 changes: 24 additions & 0 deletions .changes/v2.17.0/511-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
* Add `AdminOrg` methods `CreateCatalogFromSubscriptionAsync` and `CreateCatalogFromSubscription` to create a
subscribed catalog [GH-511]
* Add method `AdminCatalog.FullSubscriptionUrl` to return the subscription URL of a published catalog [GH-511]
* Add method `AdminCatalog.WaitForTasks` to wait for catalog tasks to complete [GH-511]
* Add method `AdminCatalog.UpdateSubscriptionParams` to modify the terms of an existing subscription [GH-511]
* Add methods `Catalog.QueryTaskList` and `AdminCatalog.QueryTaskList` to retrieve the tasks associated with a catalog [GH-511]
* Add function `IsValidUrl` to determine if a URL is valid [GH-511]
* Add `AdminCatalog` methods `Sync` and `LaunchSync` to synchronise a subscribed catalog [GH-511]
* Add method `AdminCatalog.GetCatalogHref` to retrieve the HREF of a regular catalog [GN-511]
* Add `AdminCatalog` methods `QueryCatalogItemList`, `QueryVappTemplateList`, and `QueryMediaList` to retrieve lists of
dependent items [GH-511]
* Add `AdminCatalog` methods `LaunchSynchronisationVappTemplates`, `LaunchSynchronisationAllVappTemplates`,
`LaunchSynchronisationMediaItems`, and `LaunchSynchronisationAllMediaItems` to start synchronisation of dependent
items [GH-511]
* Add `AdminCatalog` methods `GetCatalogItemByHref` and `QueryCatalogItem` to retrieve a single Catalog Item [GH-511]
* Add method `CatalogItem.LaunchSync` to start synchronisation of a catalog item [GH-511]
* Add method `CatalogItem.Refresh` to get fresh contents for a catalog item [GH-511]
* Add function `WaitResource` to wait for tasks associated to a gioven resource [GH-511]
* Add function `MinimalShowTask` to display task progress with minimal info [GH-511]
* Add functions `ResourceInProgress` and `ResourceComplete` to check on task activity for a given entity [GH-511]
* Add functions `SkimTasksList`, `SkimTasksListMonitor`, `WaitTaskListCompletion`, `WaitTaskListCompletionMonitor` to
process lists of tasks and lists of task IDs [GH-511]
* Add `Client` methods `GetTaskByHREF` and `GetTaskById` to retrieve individual tasks [GH-511]
* Implement `QueryItem` for `Task` and `AdminTask` (`GetHref`, `GetName`, `GetType`, `GetParentId`, `GetParentName`, `GetMetadataValue`, `GetDate`) [GH-511]
6 changes: 5 additions & 1 deletion .github/workflows/check-security.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Run Gosec
on: [push, pull_request]
on: [ push, pull_request ]
jobs:
gosec:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Checkout Source
uses: actions/checkout@v2
- name: gosec
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vmware/go-vcloud-director/v2

go 1.18
go 1.19

require (
github.com/araddon/dateparse v0.0.0-20190622164848-0fb0a474d195
Expand Down
Loading

0 comments on commit b6a9b94

Please sign in to comment.