Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop v6.0.0 #90

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A clear and concise description of what you expected to happen.
Please provide an screenshot of the successful API call with cuRL, Postman, etc.

**Environment (please complete the following information):**
* Cisco DNA Center Version and patch:
* Cisco Catalyst Center Version and patch:
* Go Version:
* SDK version:
* OS Version:
Expand Down
23 changes: 17 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.0.0] - 2024-11-14

### Added
New services for Cisco Catalyst Center 2.3.7.6's API:
- CiscoTrustedCertificates *CiscoTrustedCertificatesService
- AIEndpointAnalytics *AIEndpointAnalyticsService

## [5.0.32] - 2024-08-06
### Added
- Set User-Agent header in API client
Expand All @@ -24,6 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [5.0.28] - 2024-06-04
- `TopOfStackSerialNumber` and `CablingScheme` added to `RequestDeviceOnboardingPnpClaimADeviceToASite`
- Fix `ResponseItemWirelessGetWirelessProfileProfileDetailsSSIDDetails` to support empty string

### Note
- SDK now compatible with Cisco Catalyst Center 2.3.7.6's API.

## [5.0.27] - 2024-04-22
- Function `GetTemplatesDetails` change response struct from an object to an array objects.
Expand Down Expand Up @@ -161,7 +171,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [5.0.0] - 2023-04-12
### Added
- New services for Cisco DNA Center 2.3.5.3's API:
- New services for Cisco Catalyst Center 2.3.5.3's API:
- AuthenticationManagement *AuthenticationManagementService
- DisasterRecovery *DisasterRecoveryService
- EoX *EoXService
Expand Down Expand Up @@ -202,7 +212,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- WirelessService.RebootAccessPoints
- WirelessService.ConfigureAccessPoints

- The SDK was updated with the official DNA Center API 2.3.5.3 documentation, therefore some structures or data types may have changed.[Oficial Documentation](https://developer.cisco.com/docs/dna-center/#!cisco-dna-center-2-3-5-api-overview).
- The SDK was updated with the official Catalyst Center API 2.3.5.3 documentation, therefore some structures or data types may have changed.[Oficial Documentation](https://developer.cisco.com/docs/dna-center/#!cisco-dna-center-2-3-5-api-overview).



Expand Down Expand Up @@ -269,19 +279,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [4.0.0] - 2022-06-16

### Added
New services for Cisco DNA Center 2.3.3.0's API:
New services for Cisco Catalyst Center 2.3.3.0's API:
- CiscoDnaCenterSystem *CiscoDnaCenterSystemService
- LanAutomation *LanAutomationService
- SystemSettings *SystemSettingsService

### Removed
Services removed on Cisco DNA Center 2.3.3.0's API:
Services removed on Cisco Catalyst Center 2.3.3.0's API:
- AuthenticationManagement *AuthenticationManagementService
- DisasterRecovery *DisasterRecoveryService
- Policy *PolicyService

### Changed
- SDK now compatible with Cisco DNA Center 2.3.3.0's API.
- SDK now compatible with Cisco Catalyst Center 2.3.3.0's API.

## [3.6.3] - 2022-03-17
### Changed
Expand Down Expand Up @@ -647,4 +657,5 @@ Services removed on Cisco DNA Center 2.3.3.0's API:
[5.0.30]: https://github.com/cisco-en-programmability/dnacenter-go-sdk/compare/v5.0.29...v5.0.30
[5.0.31]: https://github.com/cisco-en-programmability/dnacenter-go-sdk/compare/v5.0.30...v5.0.31
[5.0.32]: https://github.com/cisco-en-programmability/dnacenter-go-sdk/compare/v5.0.31...v5.0.32
[Unreleased]: https://github.com/cisco-en-programmability/dnacenter-go-sdk/compare/v5.0.32...main
[6.0.0]: https://github.com/cisco-en-programmability/dnacenter-go-sdk/compare/v5.0.27...v6.0.0
[Unreleased]: https://github.com/cisco-en-programmability/dnacenter-go-sdk/compare/v6.0.0...main
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# dnacenter-go-sdk

dnacenter-go-sdk is a Go client library for [DNA Center Platform](https://developer.cisco.com/dnacenter/).
dnacenter-go-sdk is a Go client library for [Catalyst Center Platform](https://developer.cisco.com/dnacenter/).

## Usage

```go
import dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
import dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
```

## Introduction

The dnacenter-go-sdk makes it easier to work with the Cisco DNA Center Platform RESTFul APIs from Go.
The dnacenter-go-sdk makes it easier to work with the Cisco Catalyst Center Platform RESTFul APIs from Go.

It supports version 2.3.5.3, but it is backward compatible with other versions as long as those versions use the same URLs and options as version 2.3.5.3.

Expand All @@ -25,7 +25,7 @@ The first think you need to do is to generate an API client. There are two optio

The client could be generated with the following parameters:

- `baseURL`: The base URL, FQDN or IP, of the DNA instance.
- `baseURL`: The base URL, FQDN or IP, of the Catalyst Center instance.
- `username`: The username for the API authentication and authorization.
- `password`: The password for the API authentication and authorization.
- `debug`: Boolean to enable debugging
Expand All @@ -43,7 +43,7 @@ devicesCount, _, err := Client.Devices.GetDeviceCount()

The client can be configured with the following environment variables:

- `DNAC_BASE_URL`: The base URL, FQDN or IP, of the DNA instance.
- `DNAC_BASE_URL`: The base URL, FQDN or IP, of the Catalyst Center instance.
- `DNAC_USERNAME`: The username for the API authentication and authorization.
- `DNAC_PASSWORD`: The password for the API authentication and authorization.
- `DNAC_DEBUG`: Boolean to enable debugging
Expand Down Expand Up @@ -85,6 +85,8 @@ if devices.Response != nil {

## Documentation
### dnacenter-go-sdk/v5
[![PkgGoDev](https://pkg.go.dev/badge/github.com/)](https://pkg.go.dev/github.com/cisco-en-programmability/dnacenter-go-sdk/v6)
### dnacenter-go-sdk/v5
[![PkgGoDev](https://pkg.go.dev/badge/github.com/)](https://pkg.go.dev/github.com/cisco-en-programmability/dnacenter-go-sdk/v5)
### dnacenter-go-sdk/v4
[![PkgGoDev](https://pkg.go.dev/badge/github.com/)](https://pkg.go.dev/github.com/cisco-en-programmability/dnacenter-go-sdk/v4)
Expand All @@ -96,20 +98,21 @@ if devices.Response != nil {
[![PkgGoDev](https://pkg.go.dev/badge/github.com/)](https://pkg.go.dev/github.com/cisco-en-programmability/dnacenter-go-sdk)
## Compatibility matrix

| SDK versions | Cisco DNA Center version supported |
| SDK versions | Cisco Catalyst Center version supported |
|--------------|------------------------------------|
| 0.y.z | 2.1.2 |
| 1.y.z | 2.1.2 |
| 2.y.z | 2.2.2.3 |
| 3.y.z | 2.2.3.3 |
| 4.y.z | 2.3.3.0 |
| 5.y.z | 2.3.5.3 |
| 6.y.z | 2.3.7.6 |

## Changelog

All notable changes to this project will be documented in the [CHANGELOG](https://github.com/cisco-en-programmability/dnacenter-go-sdk/blob/main/CHANGELOG.md) file.

The development team may make additional name changes as the library evolves with the Cisco DNA Center APIs.
The development team may make additional name changes as the library evolves with the Cisco Catalyst Center APIs.


## License
Expand Down
4 changes: 2 additions & 2 deletions examples/application-policy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/applications/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/clients/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/command-runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"time"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/compliance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
6 changes: 3 additions & 3 deletions examples/configuration_archive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down Expand Up @@ -39,7 +39,7 @@ func main() {

fmt.Println("Post ConfArchive")
reqBody := &dnac.RequestConfigurationArchiveExportDeviceConfigurations{
DeviceID: []string{deviceUUID},
DeviceID: deviceUUID,
Password: "C1sco123!",
}

Expand Down
6 changes: 3 additions & 3 deletions examples/configuration_templates/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"encoding/json"
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func responseInterfaceToString(v interface{}) string {
Expand Down Expand Up @@ -93,7 +93,7 @@ func main() {
// return
// }

resp, _, err := client.ConfigurationTemplates.GetProjectsDetails(&dnac.GetProjectsDetailsQueryParams{
resp, _, err := client.ConfigurationTemplates.GetProjectsDetailsV2(&dnac.GetProjectsDetailsV2QueryParams{
Name: "Onboarding Configuration",
})

Expand Down
6 changes: 3 additions & 3 deletions examples/credentials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down Expand Up @@ -61,7 +61,7 @@ func main() {
secure := true
httpWriteCredentials := &dnac.RequestDiscoveryCreateHTTPWriteCredentials{
dnac.RequestItemDiscoveryCreateHTTPWriteCredentials{
Comments: "DNA Center HTTP Credentials",
Comments: "Catalyst Center HTTP Credentials",
Description: "HTTP Creds",
Password: "HTTP-cr3d$",
Port: &port,
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-call/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var Client *dnac.Client

func main() {
Expand Down
6 changes: 3 additions & 3 deletions examples/devices/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var Client *dnac.Client

func main() {
Expand All @@ -21,7 +21,7 @@ func main() {
}

fmt.Println("Getting device count")
devicesCount, _, err := Client.Devices.GetDeviceCount2()
devicesCount, _, err := Client.Devices.GetDeviceConfigCount()
if err != nil {
fmt.Println(err)
}
Expand Down
4 changes: 2 additions & 2 deletions examples/discovery/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/event-management/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/execution-id/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/files/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/global-pool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// Client is DNA Center API client
// Client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/health-monitoring/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v5/sdk"
dnac "github.com/cisco-en-programmability/dnacenter-go-sdk/v6/sdk"
)

// client is DNA Center API client
// client is Catalyst Center API client
var client *dnac.Client

func main() {
Expand Down
Loading
Loading