Giter Site home page Giter Site logo

vinyldns-java's Issues

Unit Tests for: batch changes

https://www.vinyldns.io/api/batchchange-model.html

create/get batch change has already been added (see https://github.com/vinyldns/vinyldns-java/tree/master/src/main/java/io/vinyldns/java/model/batch). We need to add some tests in https://github.com/vinyldns/vinyldns-java/blob/master/src/test/java/io/vinyldns/java/VinylDNSClientTest.java to create a basic batch change (make a batchChange with just one singleChange within it), get the batch change back and validate the fields.

Add ownerGroupId to BatchRecordChanges create method

In support of the new shared zones feature coming to VinylDNS we need to add the optional ownerGroupId field to the BatchRecordChanges create method. Refer to the VinylDNS documentation for more information.

API doc: https://www.vinyldns.io/api/create-batchchange.html

Example Request:

{
    "comments": "this is optional",
    "ownerGroupId": "f42385e4-5675-38c0-b42f-64105e743bfe"
    "changes": [
        {
            "inputName": "example.com.",
            "changeType": "Add",
            "type": "A",  
            "ttl": 3600, 
            "record": {
                "address": "1.1.1.1"
            } 
        }, 
        {
            "inputName": "192.0.2.195",
            "changeType": "Add",
            "type": "PTR", 
            "ttl": 3600,
            "record": {
                "ptrdname": "ptrdata.data."
            }
        }, 
        {
            "inputName": "cname.example.com.",
            "changeType": "DeleteRecordSet",
            "type": "CNAME"
        }, 
        {
            "inputName": "update.another.example.com.",
            "changeType": "DeleteRecordSet",
            "type": "AAAA"
        }, 
        {
            "inputName": "update.another.example.com.",
            "changeType": "Add",
            "type": "AAAA", 
            "ttl": 4000,
            "record": {
                "address": "1:2:3:4:5:6:7:8"
            }
        }
    ]
}

Additional Information

Change groupId to `io.vinyldns`

Recently got our sonatype / maven central setup complete. We can only publish under the io.vinyldns groupId.

Change the pom to this.

Add ownerGroupId to RecordSet update method

In support of the new shared zones feature coming to VinylDNS we need to add the optional ownerGroupId field to the RecordSet update method.

Example Request

{
  "id": "dd9c1120-0594-4e61-982e-8ddcbc8b2d21",
  "name": "already-exists",
  "type": "A",
  "ttl": 38400,
  "records": [
    {
      "address": "6.5.4.3"
    }
  ],
  "zoneId": "2467dc05-68eb-4498-a9d5-78d24bb0893c",
  "ownerGroupId": "f42385e4-5675-38c0-b42f-64105e743bfe"
}

Additional Information

See #45 for more info. Create blocks update as they both share the RecordSetBase changes

Remove unnecessary dependencies & update existing ones

According to this report, there are two vulnerable dependencies and several outdated once.

Also, the library has compile dependencies on Maven Plug-in API. There is zero evidence that any on the Java code uses Maven code:
https://github.com/search?q=repo%3Avinyldns%2Fvinyldns-java+%28maven+OR+plexus%29&type=code

It should be removed because it brings unnecessary transitive dependencies into any runtime use of the library.

It seems to have been brought in with the very first commit:
7f38e12

Add ownerGroupId to CreateRecordSet endpoint

In support of the new shared zones feature coming to VinylDNS we need to add the optional ownerGroupId field to the RecordSet create method.

Example Request:

{
  "name": "foo",
  "type": "A",
  "ttl": 300,
  "records": [
    {
      "address": "10.10.10.10"
    }
  ],
  "zoneId": "2467dc05-68eb-4498-a9d5-78d24bb0893c",
  "ownerGroupId": "f42385e4-5675-38c0-b42f-64105e743bfe"
}

See api docs at https://www.vinyldns.io/api/create-recordset.html

Expected Changes

Standardize on indentation

vinyldns-java appears to use a mix of 2 and 4 space indentation. Is it reasonable to standardize the indentation?

Support default environment variables for client instantiation

Provide a way to load a client from environment variables using no arguments in VinylDNSClientImpl. The environment variable naming should maintain consistency with our other clients:

  • VINYLDNS_API_URL
  • VINYLDNS_ACCESS_KEY_ID
  • VINYLDNS_SECRET_ACCESS_KEY

Note: A combination of EnvironmentVariableCredentialsProvider for AWS credentials and System.env can be used to implement this.

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.