Giter Site home page Giter Site logo

ne-go's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ne-go's Issues

Fix ID field casing convention in internal/

ID/UUID appears to be the convention we've been using in ne-go. We have many examples of ...UUID, ...ID, IP..., and MAC....

We have some exceptions like SshInterfaceId, ClusterId, and LicenseFileId. Because these are in internal/ we can change these freely.

It looks like we should update https://github.com/equinix/ne-go/pull/12/files#diff-79aab787cbc1ff2a0a825a43f479b275e28ea9cc070c72eeede7aeda30894c25R88 and https://github.com/equinix/ne-go/pull/12/files#diff-79aab787cbc1ff2a0a825a43f479b275e28ea9cc070c72eeede7aeda30894c25R69 to use the MgmtAclTemplateUUID too. These are inside of the internal path, so there is no breaking change.

We also have some public exceptions:

$ git grep -n  -e Id -e Uuid client.go rest_client.go
client.go:249:  MgmtAclTemplateUuid *string
client.go:263:  WanInterfaceId      *string
client.go:435:  ClusterId          *string
client.go:446:  LicenseFileId       *string

Perhaps we can standardize those in a future breaking change. (Update: #15 will address this)

Originally posted by @displague in #12 (comment)

Support for updating licenses

Currently the API calls listed below are not supported. Adding these functions would be useful to update a license after receiving a registration failed without recreating the whole device which can take a lot of time. This is the current behavior if it is created from the portal. They are also necessary to renew expired licenses without having to create a new device.

Cleanup of ECXF L2 connection related code

Code to manage ECXF L2 connection was added to NetworkEdge client module due to historical reasons.
At the end, possibility to manage L2 connections from Network Edge devices was introduced in ecx-go module (with small workaround).
All ECXF L2 connection related code can be safely removed from ne-go module.

Support for BGP Sync

After creating a connection to Azure and configuring BGP peering, it requires a synchronization process to start working. Currently there is an automatic job running each 5 min to auto sync, however some customers are using the API call described here step-3-setup-microsoft-peering-0 to instantly synchronize the connection

This is especially necessary to configure a hybrid architecture using the equinix terraform provider, otherwise it would be necessary to use a workaround like adding a time_sleep to wait for the automatic synchronization, or at least to remove ConnectionStatusPendingBGPPeering from https://github.com/equinix/terraform-provider-equinix/blob/master/equinix/resource_ecx_l2_connection.go#L469 to ensure that the connection will be marked as completed only once after syncing

Document the format of types in client.go

client.go provides an interface and types that are consumed by the Terraform provider.

This format does not usually match the internal API structures (which are found in internal/api).

Often, the structures in client.go are a composite type merging the request and response fields.

We should document this intention and provide examples in the README.md so that it is clear to developers and reviewers what expectations we have.

Add possibility to fetch device ACLs using dedicated endpoint

Problem

Device ACLs are listed in a response to GET /ne/v1/device request only once they are provisioned. Response does not contain information about ACL provisioning status neither.
From Terraform side, it looks like information about requested ACLs is not reflected at all after successful device creation.

Solution

Add additional function in NE client to fetch ACLs using dedicated FQDN ACL endpoint GET /ne/v1/device/<deviceUUID>/fqdn-acls. This endpoint exposes valid information about ACLs that were requested along with their provisioning status. This endpoint is already used in Ne client to replace device ACLs.

Figure out a v2 strategy

Several API changes have been to the backing API and the Go SDK. Some fields are persisting in the SDK, and are (in some cases) no longer provided by the API. Some SDK structures would benefit from refactoring.

Because this client is a semver v1 client, our breaking changes will need to be released with consideration of Go Module v2 semantics:
https://go.dev/doc/modules/release-workflow#breaking
https://go.dev/blog/module-compatibility
https://codeengineered.com/blog/2019/go-mod-major-versions/

https://github.com/equinix/ne-go#purpose should define the deprecation patterns used and the versioning strategy.

Once ready - we should publish a v2 with the deprecated fields removed.

This was previously discussed in #4 (comment)

Fix ID field casing convention in client.go

ID/UUID appears to be the convention we've been using in ne-go. We have many examples of ...UUID, ...ID, IP..., and MAC....

We have some public type definitions that don't fit the current convention.

$ git grep -n  -e Id -e Uuid client.go rest_client.go
client.go:249:  MgmtAclTemplateUuid *string
client.go:263:  WanInterfaceId      *string
client.go:435:  ClusterId          *string
client.go:446:  LicenseFileId       *string

This issue is a continuation of #13 where the internal representation of these types was updated.

Addressing this issue may constitute a breaking change so it was deferred from #13.

Originally posted by @displague in #12 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.