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

Merge DNS (alpha) into master #795

Merged
merged 104 commits into from
Mar 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
2bf4925
Initial project for Google Cloud DNS in gcloud-java
mderka Jan 16, 2016
fe4e137
Added DnsRecord as a part of the basic data model.
mderka Jan 16, 2016
f652277
Implemented comments by @mziccard
mderka Jan 19, 2016
b29945f
Second round of comments from @mziccard
mderka Jan 20, 2016
1fc0e32
Implemented comments by @aozarov. Also removed incomplete
mderka Jan 21, 2016
01662be
Implements comments by @ajkannan
mderka Jan 21, 2016
1c65715
Removed the method for removing a record by index.
mderka Jan 21, 2016
f994057
Another round of comments from @aozarov.
mderka Jan 22, 2016
7493f1a
Merge pull request #559 from mderka/gcloud-dns
aozarov Jan 22, 2016
1c69b05
Merge pull request #574 from GoogleCloudPlatform/master
mderka Jan 22, 2016
e8dd142
Created a ManagedZoneInfo class as part of the model.
mderka Jan 20, 2016
c95c3aa
Implemented comments by @aozarov.
mderka Jan 23, 2016
dacea19
Another round of comments from @aozarov.
mderka Jan 25, 2016
20f325b
Merge pull request #575 from mderka/dns-managed-zone
aozarov Jan 26, 2016
273b441
Implemented ChangeRequest.
mderka Jan 26, 2016
35cfd61
Added test for ChangeRequest.
mderka Jan 26, 2016
6f9e1c0
Implements comments from @ajkannan and @aozarov.
mderka Jan 27, 2016
438c05a
Merge pull request #587 from mderka/dns-change
mderka Jan 27, 2016
9b4ff48
Added ProjectInfo.
mderka Jan 26, 2016
a47158d
Fixed serialization, javadoc and checkstyle.
mderka Jan 27, 2016
9db27d4
Implements comment from @aozarov and @ajkannan into ProjectInfo.
mderka Jan 28, 2016
4412c73
Changed documentation @code to @link where applicable.
mderka Jan 28, 2016
2c87334
Merge pull request #590 from mderka/dns-project
mderka Jan 28, 2016
81a46d8
Renames ManagedZone to Zone. Acommodates codecheck. Fixes #579.
mderka Jan 28, 2016
c364ff3
Modified ttl to accept time unit. Fixed #581.
mderka Jan 28, 2016
7bcff48
Implemented comments by @aozarov.
mderka Jan 28, 2016
a2fdb69
Merge pull request #592 from mderka/dns-polishing
mderka Jan 28, 2016
f9b6f6a
Added DnsService interface.
mderka Jan 28, 2016
4fdc8ee
Added AbstractOption.
mderka Jan 28, 2016
06becd8
Added DnsException.
mderka Jan 28, 2016
81cedc4
Added DnsServiceRpc.
mderka Jan 29, 2016
bf1361c
Added DnsServiceOptions and necessary dependencies.
mderka Jan 29, 2016
465f532
Modified DnsException to pass tests.
mderka Jan 29, 2016
a8bee9c
Implements comments by @aozarov.
mderka Jan 30, 2016
762483b
Makes ProjectInfo.Quota serializable. Fixed #599.
mderka Jan 30, 2016
e17bedb
Implemented DnsOptions up to two unavailable classes.
mderka Jan 30, 2016
adf5c1c
Added test for AbstractOption.
mderka Feb 1, 2016
a9cc927
Implemented comments by @aozarov. Added test for option accessors.
mderka Feb 1, 2016
6ecde35
Comments by @aozarov second round.
mderka Feb 2, 2016
c5566eb
Merge pull request #597 from mderka/dns-options
mderka Feb 2, 2016
a69101a
Added Dns methods. Fixes #596. Added Zone and ZoneTest
mderka Feb 2, 2016
e083dfd
Fixed documentation and some code formatting. Declared exceptions to be
mderka Feb 2, 2016
d6daf09
Adjusted documentation, removed getProjectId and getProjectNumber
mderka Feb 3, 2016
e3686e3
Merge pull request #606 from mderka/dns-options
mderka Feb 3, 2016
0338ead
Completes DnsRpc interface by adding methods and doc.
mderka Feb 3, 2016
bc4b820
Implements DefaultDnsRpc. Progress in #595.
mderka Feb 3, 2016
896de75
Fixed documentation and null returns from rpc.
mderka Feb 3, 2016
3ae0f21
Change Tuple<X,Y> into ListResult<X>, added NAME option.
mderka Feb 4, 2016
35dbb34
Merge pull request #616 from mderka/dns-options
aozarov Feb 4, 2016
71f5ae2
Makes name of Zone mandatory and removes id-based methods.
mderka Feb 4, 2016
3183f4a
Added field options for zone create method.
mderka Feb 4, 2016
4057dcd
Fixed doc after refactoring. Made zone name mandatory in fields.
mderka Feb 5, 2016
d722635
Javadoc fixed.
mderka Feb 5, 2016
b128548
Merge pull request #620 from mderka/dns-options
mderka Feb 5, 2016
5be58b3
Makes Zone subclass of ZoneInfo. Fixes #605.
mderka Feb 7, 2016
d1c4512
Added implementation of Dns and test. Renamed getProjectInfo.
mderka Feb 7, 2016
c0c5451
Included options attribute to Zone. Fixed symmetry of toPb and fromPb.
mderka Feb 8, 2016
ee5bb8f
Removed zone.get() and optimized retries.
mderka Feb 9, 2016
86b4356
Merge pull request #629 from mderka/rpc-default
aozarov Feb 9, 2016
db52e09
Made nameServerSet read only and setters package private.
mderka Feb 9, 2016
fa081ac
Merge pull request #633 from mderka/rpc-default
mderka Feb 9, 2016
a1ec7f4
Added local implementation of the service and tests.
mderka Feb 19, 2016
04f354a
Added RPC layer of tests for local helpers. Closes #665.
mderka Feb 23, 2016
cbf737d
Added integration tests.
mderka Feb 24, 2016
75269ff
Removed unnecessary integration tests. Adjusted deleting objects.
mderka Feb 26, 2016
9b6929b
Added retryable errors.
mderka Mar 1, 2016
22153aa
Added sleep and renamed change completion check.
mderka Mar 1, 2016
44b1998
Merge pull request #674 from mderka/integration
mderka Mar 2, 2016
4f28101
Added retries for userRateLimitExceeded and rateLimitExceeded.
mderka Mar 2, 2016
030e819
Merge pull request #700 from mderka/retries
mderka Mar 3, 2016
5a1d93f
Merge branch 'master' into merge-master
mderka Mar 3, 2016
5858809
pom.xml version edit
mderka Mar 3, 2016
d163bfb
Merge pull request #707 from mderka/merge-master
ajkannan Mar 3, 2016
8684506
Added missing waits for change completion.
mderka Mar 3, 2016
8e6aeef
Merge pull request #708 from mderka/integration
mderka Mar 3, 2016
b8031e1
Adjusted clear not to collide when parallel test are running.
mderka Mar 4, 2016
481db7a
Merge pull request #713 from mderka/integration
mderka Mar 4, 2016
1f06caf
The following has been done within multiple iterations:
mderka Feb 24, 2016
53e87fe
Merge pull request #656 from mderka/dummy
mderka Mar 9, 2016
3cf0722
Switched ZoneInfo.builder(). to ZoneInfo.of(). Fixes #698.
mderka Mar 1, 2016
90897f3
Renamed a test method and a variable.
mderka Mar 10, 2016
a26bd59
Merge pull request #736 from mderka/zone-of
mziccard Mar 10, 2016
767be65
LocalDnsHelper adds the default change upon creating a zone.
mderka Mar 14, 2016
f5c0587
Merge pull request #746 from mderka/local-adjustment
mderka Mar 14, 2016
96e380c
Moved spi package to dns.spi as per #742
mderka Mar 14, 2016
6be68bc
Merge pull request #748 from mderka/spi-refactor
ajkannan Mar 14, 2016
886a8bd
Added a DNS example and documentation.
mderka Mar 2, 2016
8e82f35
Fixed based on first round of comments:
mderka Mar 10, 2016
da877d8
Added code snippets for DNS.
mderka Mar 10, 2016
3cdc3a4
Merge pull request #717 from mderka/example
mderka Mar 15, 2016
baee7d7
Added integration test for invalid change request.
mderka Mar 14, 2016
736b6e1
Merge pull request #749 from mderka/spi-refactor
mderka Mar 15, 2016
f7f4de8
Added READMEs. This includes:
mderka Mar 1, 2016
17442b0
Merge pull request #750 from mderka/readme
mderka Mar 16, 2016
d974887
Merge remote-tracking branch 'upstream/master' into dns-alpha
mderka Mar 23, 2016
e946b76
Updated the version in pom.
mderka Mar 23, 2016
9ac6a82
Merge pull request #782 from mderka/merge-master
ajkannan Mar 23, 2016
5c3fc94
Refactored the serialization test to use the base test
mderka Mar 23, 2016
2f90e7e
Merge pull request #783 from mderka/newserialization
ajkannan Mar 23, 2016
1a5aade
Renamed DnsRecord to RecordSet. Fixes #779.
mderka Mar 23, 2016
96e28d6
Merge pull request #784 from mderka/rename-dns-record
mderka Mar 24, 2016
01e2310
Turned ChangeRequest into a functional object.
mderka Mar 24, 2016
de8bf4b
Addressed comments. This includes:
mderka Mar 25, 2016
104f9e5
Merge pull request #789 from mderka/change-request-functional
mderka Mar 26, 2016
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
74 changes: 73 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This client supports the following Google Cloud Platform services:

- [Google Cloud BigQuery] (#google-cloud-bigquery-alpha) (Alpha)
- [Google Cloud Datastore] (#google-cloud-datastore)
- [Google Cloud DNS] (#google-cloud-dns-alpha) (Alpha)
- [Google Cloud Resource Manager] (#google-cloud-resource-manager-alpha) (Alpha)
- [Google Cloud Storage] (#google-cloud-storage)

Expand Down Expand Up @@ -48,8 +49,10 @@ Example Applications
- Read more about using this application on the [`BigQueryExample` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/bigquery/BigQueryExample.html).
- [`Bookshelf`](https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/bookshelf) - An App Engine app that manages a virtual bookshelf.
- This app uses `gcloud-java` to interface with Cloud Datastore and Cloud Storage. It also uses Cloud SQL, another Google Cloud Platform service.
- [`DatastoreExample`](./gcloud-java-examples/src/main/java/com/google/gcloud/examples/datastore/DatastoreExample.java) - A simple command line interface for the Cloud Datastore
- [`DatastoreExample`](./gcloud-java-examples/src/main/java/com/google/gcloud/examples/datastore/DatastoreExample.java) - A simple command line interface for Cloud Datastore
- Read more about using this application on the [`DatastoreExample` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/datastore/DatastoreExample.html).
- [`DnsExample`](./gcloud-java-examples/src/main/java/com/google/gcloud/examples/dns/DnsExample.java) - A simple command line interface for Cloud DNS
- Read more about using this application on the [`DnsExample` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/dns/DnsExample.html).
- [`ResourceManagerExample`](./gcloud-java-examples/src/main/java/com/google/gcloud/examples/resourcemanager/ResourceManagerExample.java) - A simple command line interface providing some of Cloud Resource Manager's functionality
- Read more about using this application on the [`ResourceManagerExample` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/resourcemanager/ResourceManagerExample.html).
- [`SparkDemo`](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managed_vms/sparkjava) - An example of using gcloud-java-datastore from within the SparkJava and App Engine Managed VM frameworks.
Expand Down Expand Up @@ -218,6 +221,71 @@ if (entity != null) {
}
```

Google Cloud DNS (Alpha)
----------------------
- [API Documentation][dns-api]
- [Official Documentation][cloud-dns-docs]

*Follow the [activation instructions][cloud-dns-activation] to use the Google Cloud DNS API with your project.*

#### Preview

Here are two code snippets showing simple usage examples from within Compute/App Engine. Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.

The first snippet shows how to create a zone resource. Complete source code can be found on
[CreateZone.java](./gcloud-java-examples/src/main/java/com/google/gcloud/examples/dns/snippets/CreateZone.java).

```java
import com.google.gcloud.dns.Dns;
import com.google.gcloud.dns.DnsOptions;
import com.google.gcloud.dns.Zone;
import com.google.gcloud.dns.ZoneInfo;

Dns dns = DnsOptions.defaultInstance().service();
String zoneName = "my-unique-zone";
String domainName = "someexampledomain.com.";
String description = "This is a gcloud-java-dns sample zone.";
ZoneInfo zoneInfo = ZoneInfo.of(zoneName, domainName, description);
Zone zone = dns.create(zoneInfo);
```

The second snippet shows how to create records inside a zone. The complete code can be found on [CreateOrUpdateRecordSets.java](./gcloud-java-examples/src/main/java/com/google/gcloud/examples/dns/snippets/CreateOrUpdateRecordSets.java).

```java
import com.google.gcloud.dns.ChangeRequestInfo;
import com.google.gcloud.dns.Dns;
import com.google.gcloud.dns.DnsOptions;
import com.google.gcloud.dns.RecordSet;
import com.google.gcloud.dns.Zone;

import java.util.Iterator;
import java.util.concurrent.TimeUnit;

Dns dns = DnsOptions.defaultInstance().service();
String zoneName = "my-unique-zone";
Zone zone = dns.getZone(zoneName);
String ip = "12.13.14.15";
RecordSet toCreate = RecordSet.builder("www.someexampledomain.com.", RecordSet.Type.A)
.ttl(24, TimeUnit.HOURS)
.addRecord(ip)
.build();
ChangeRequestInfo.Builder changeBuilder = ChangeRequestInfo.builder().add(toCreate);

// Verify that the record does not exist yet.
// If it does exist, we will overwrite it with our prepared record.
Iterator<RecordSet> recordSetIterator = zone.listRecordSets().iterateAll();
while (recordSetIterator.hasNext()) {
RecordSet current = recordSetIterator.next();
if (toCreate.name().equals(current.name()) &&
toCreate.type().equals(current.type())) {
changeBuilder.delete(current);
}
}

ChangeRequestInfo changeRequest = changeBuilder.build();
zone.applyChangeRequest(changeRequest);
```

Google Cloud Resource Manager (Alpha)
----------------------

Expand Down Expand Up @@ -359,6 +427,10 @@ Apache 2.0 - See [LICENSE] for more information.
[cloud-datastore-activation]: https://cloud.google.com/datastore/docs/activate
[datastore-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/datastore/package-summary.html

[dns-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/dns/package-summary.html
[cloud-dns-docs]: https://cloud.google.com/dns/docs
[cloud-dns-activation]: https://console.cloud.google.com/start/api?id=dns

[cloud-pubsub]: https://cloud.google.com/pubsub/
[cloud-pubsub-docs]: https://cloud.google.com/pubsub/docs

Expand Down
Loading