Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Update clients to provide pkgtree item defintions
Browse files Browse the repository at this point in the history
  • Loading branch information
mhornick authored and semtexzv committed Apr 14, 2021
1 parent c45c230 commit 1e6a22d
Show file tree
Hide file tree
Showing 52 changed files with 1,436 additions and 120 deletions.
2 changes: 1 addition & 1 deletion inventory/api/openapi.json

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions inventory/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -72,6 +73,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: Ordering field name
Expand Down Expand Up @@ -113,7 +115,9 @@ paths:
- stale
- stale_warning
- unknown
nullable: false
type: string
nullable: false
type: array
style: form
- description: filters out hosts not tagged by the given tags
Expand Down Expand Up @@ -146,6 +150,15 @@ paths:
description: System profile field values to filter with
type: object
style: deepObject
- description: Fetches only mentioned system_profile fields
explode: true
in: query
name: fields
required: false
schema:
description: System profile field values to fetch
type: object
style: deepObject
responses:
"200":
content:
Expand Down Expand Up @@ -526,6 +539,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -536,6 +550,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: Ordering field name
Expand Down Expand Up @@ -775,6 +790,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -785,6 +801,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: Ordering field name
Expand Down Expand Up @@ -869,6 +886,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -879,6 +897,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: Ordering field name
Expand Down Expand Up @@ -954,6 +973,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -964,6 +984,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: Ordering field name
Expand Down Expand Up @@ -1037,6 +1058,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -1047,6 +1069,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: 'Culling states of the hosts. Default: fresh,stale,unknown'
Expand All @@ -1065,7 +1088,9 @@ paths:
- stale
- stale_warning
- unknown
nullable: false
type: string
nullable: false
type: array
style: form
- description: Filters out any host not registered with the specified service
Expand Down Expand Up @@ -1128,6 +1153,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -1138,6 +1164,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: 'Culling states of the hosts. Default: fresh,stale,unknown'
Expand All @@ -1156,7 +1183,9 @@ paths:
- stale
- stale_warning
- unknown
nullable: false
type: string
nullable: false
type: array
style: form
- description: Filters out any host not registered with the specified service
Expand Down Expand Up @@ -1234,6 +1263,7 @@ paths:
schema:
default: 10000
minimum: 1
nullable: false
type: integer
style: form
responses:
Expand Down Expand Up @@ -1270,6 +1300,7 @@ paths:
enum:
- tag
- count
nullable: false
type: string
style: form
- description: Direction of the ordering. Default to ASC
Expand All @@ -1282,6 +1313,7 @@ paths:
enum:
- ASC
- DESC
nullable: false
type: string
style: form
- description: A number of items to return per page.
Expand All @@ -1293,6 +1325,7 @@ paths:
default: 50
maximum: 100
minimum: 1
nullable: false
type: integer
style: form
- description: A page number of the items to return.
Expand All @@ -1303,6 +1336,7 @@ paths:
schema:
default: 1
minimum: 1
nullable: false
type: integer
style: form
- description: 'Culling states of the hosts. Default: fresh,stale,unknown'
Expand All @@ -1321,7 +1355,9 @@ paths:
- stale
- stale_warning
- unknown
nullable: false
type: string
nullable: false
type: array
style: form
- description: Only include tags that match the given search string. The value
Expand Down Expand Up @@ -2556,6 +2592,13 @@ components:
maxLength: 512
type: string
type: array
gpg_pubkeys:
items:
description: A package name string of a single imported GPG pubkey
example: gpg-pubkey-11111111-22222222
maxLength: 512
type: string
type: array
infrastructure_type:
maxLength: 100
type: string
Expand Down
8 changes: 8 additions & 0 deletions inventory/api_hosts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions inventory/docs/HostsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Name | Type | Description | Notes

## ApiHostGetHostList

> AHostInventoryQueryResult ApiHostGetHostList(ctx).DisplayName(displayName).Fqdn(fqdn).HostnameOrId(hostnameOrId).InsightsId(insightsId).BranchId(branchId).PerPage(perPage).Page(page).OrderBy(orderBy).OrderHow(orderHow).Staleness(staleness).Tags(tags).RegisteredWith(registeredWith).Filter(filter).Execute()
> AHostInventoryQueryResult ApiHostGetHostList(ctx).DisplayName(displayName).Fqdn(fqdn).HostnameOrId(hostnameOrId).InsightsId(insightsId).BranchId(branchId).PerPage(perPage).Page(page).OrderBy(orderBy).OrderHow(orderHow).Staleness(staleness).Tags(tags).RegisteredWith(registeredWith).Filter(filter).Fields(fields).Execute()
Read the entire list of hosts

Expand Down Expand Up @@ -201,10 +201,11 @@ func main() {
tags := []string{"Inner_example"} // []string | filters out hosts not tagged by the given tags (optional)
registeredWith := "registeredWith_example" // string | Filters out any host not registered with the specified service (optional)
filter := TODO // map[string]interface{} | Filters hosts based on system_profile fields (optional)
fields := TODO // map[string]interface{} | Fetches only mentioned system_profile fields (optional)

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.HostsApi.ApiHostGetHostList(context.Background()).DisplayName(displayName).Fqdn(fqdn).HostnameOrId(hostnameOrId).InsightsId(insightsId).BranchId(branchId).PerPage(perPage).Page(page).OrderBy(orderBy).OrderHow(orderHow).Staleness(staleness).Tags(tags).RegisteredWith(registeredWith).Filter(filter).Execute()
resp, r, err := api_client.HostsApi.ApiHostGetHostList(context.Background()).DisplayName(displayName).Fqdn(fqdn).HostnameOrId(hostnameOrId).InsightsId(insightsId).BranchId(branchId).PerPage(perPage).Page(page).OrderBy(orderBy).OrderHow(orderHow).Staleness(staleness).Tags(tags).RegisteredWith(registeredWith).Filter(filter).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HostsApi.ApiHostGetHostList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand Down Expand Up @@ -238,6 +239,7 @@ Name | Type | Description | Notes
**tags** | **[]string** | filters out hosts not tagged by the given tags |
**registeredWith** | **string** | Filters out any host not registered with the specified service |
**filter** | [**map[string]interface{}**](map[string]interface{}.md) | Filters hosts based on system_profile fields |
**fields** | [**map[string]interface{}**](map[string]interface{}.md) | Fetches only mentioned system_profile fields |

### Return type

Expand Down
26 changes: 26 additions & 0 deletions inventory/docs/SystemProfileSpecYamlSystemProfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**DiskDevices** | Pointer to [**[]SystemProfileSpecYamlDiskDevice**](SystemProfileSpecYamlDiskDevice.md) | | [optional]
**DnfModules** | Pointer to [**[]SystemProfileSpecYamlDnfModule**](SystemProfileSpecYamlDnfModule.md) | | [optional]
**EnabledServices** | Pointer to **[]string** | | [optional]
**GpgPubkeys** | Pointer to **[]string** | | [optional]
**InfrastructureType** | Pointer to **string** | | [optional]
**InfrastructureVendor** | Pointer to **string** | | [optional]
**InsightsClientVersion** | Pointer to **string** | | [optional]
Expand Down Expand Up @@ -371,6 +372,31 @@ SetEnabledServices sets EnabledServices field to given value.

HasEnabledServices returns a boolean if a field has been set.

### GetGpgPubkeys

`func (o *SystemProfileSpecYamlSystemProfile) GetGpgPubkeys() []string`

GetGpgPubkeys returns the GpgPubkeys field if non-nil, zero value otherwise.

### GetGpgPubkeysOk

`func (o *SystemProfileSpecYamlSystemProfile) GetGpgPubkeysOk() (*[]string, bool)`

GetGpgPubkeysOk returns a tuple with the GpgPubkeys field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetGpgPubkeys

`func (o *SystemProfileSpecYamlSystemProfile) SetGpgPubkeys(v []string)`

SetGpgPubkeys sets GpgPubkeys field to given value.

### HasGpgPubkeys

`func (o *SystemProfileSpecYamlSystemProfile) HasGpgPubkeys() bool`

HasGpgPubkeys returns a boolean if a field has been set.

### GetInfrastructureType

`func (o *SystemProfileSpecYamlSystemProfile) GetInfrastructureType() string`
Expand Down
36 changes: 36 additions & 0 deletions inventory/model_system_profile_spec_yaml_system_profile.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions vmaas/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ docs/PackagesResponsePackageList.md
docs/PackagesResponseRepositories.md
docs/PatchesRequest.md
docs/PatchesResponse.md
docs/PkgTreeItem.md
docs/PkgTreeItemErrata.md
docs/PkgTreeItemRepositories.md
docs/PkgtreeRequest.md
docs/PkgtreeResponse.md
docs/RPMPkgNamesRequest.md
Expand Down Expand Up @@ -54,6 +57,9 @@ model_packages_response_package_list.go
model_packages_response_repositories.go
model_patches_request.go
model_patches_response.go
model_pkg_tree_item.go
model_pkg_tree_item_errata.go
model_pkg_tree_item_repositories.go
model_pkgtree_request.go
model_pkgtree_response.go
model_repos_request.go
Expand Down
Loading

0 comments on commit 1e6a22d

Please sign in to comment.