Skip to content

App Service: Domain CRUD#1254

Merged
martinsawicki merged 19 commits into
Azure:masterfrom
jianghaolu:web
Nov 8, 2016
Merged

App Service: Domain CRUD#1254
martinsawicki merged 19 commits into
Azure:masterfrom
jianghaolu:web

Conversation

@jianghaolu

@jianghaolu jianghaolu commented Oct 31, 2016

Copy link
Copy Markdown
Contributor

Known issue: javadocs missing
Justification: generated code is failing checkstyle. Will fix after AutoRest refactoring is done.

*/
public final class CountryISOCode {
// CHECKSTYLE IGNORE Javadoc FOR NEXT 237 LINES
public static final CountryISOCode Afghanistan = new CountryISOCode("AF");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conventions - all caps for enum constants (or static public fields) - AFGHANISTAN, ALBANIA, etc.

// CHECKSTYLE IGNORE Javadoc FOR NEXT 237 LINES
public static final CountryISOCode Afghanistan = new CountryISOCode("AF");
public static final CountryISOCode Albania = new CountryISOCode("AL");
public static final CountryISOCode Algeria = new CountryISOCode("DZ");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conventions - this should be all caps (AFGHANISTAN, ALBANIA...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix.

// CHECKSTYLE IGNORE Javadoc FOR NEXT 236 LINES
public static final CountryPhoneCode Albania = new CountryPhoneCode("+355");
public static final CountryPhoneCode Algeria = new CountryPhoneCode("+213");
public static final CountryPhoneCode Andorra = new CountryPhoneCode("+376");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all caps - i know this is auto-gen'd - don;'t we have control over capitalization of extensible enums?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix.

/**
* @return all hostnames derived from the domain and assigned to Azure resources
*/
List<HostName> managedHostNames();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about Map<String, HostName> --- isn't there some useful unique string to index by?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure DNS allows multiple mappings from a host name, for example, "www" can point to multiple IP addresses. (Probably for load balancing)

* @return host names for the web app that are enabled
*/
List<String> enabledHostNames();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume the strings in this are unique - if so how about Set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to be verified together with the previous.


List<HostNameBinding> hostNameBindings() throws CloudException, IOException;
List<HostNameBinding> getHostNameBindings();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a unique string that could be used as the index if this returned Map instead of List?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one, however, seems possible. There is probably only one binding from one host to one web app.


List<HostNameBinding> hostNameBindings() throws CloudException, IOException;
List<HostNameBinding> getHostNameBindings();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a unique string that could be used as the index if this returned Map<String, HostNameBinding> instead of List?

.withNewAppServicePlan("java-plan-323", AppServicePricingTier.STANDARD_S1)
.defineHostNameBinding(domain, "test2.javatestpr319.com")
.withHostNameType(HostNameType.MANAGED)
.withHostNameDnsRecordType(CustomHostNameDnsRecordType.A)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a thought - perhaps this could be just withDnsRecordType? Is it ambiguous?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Web app fluent design is being overhauled.

@jianghaolu jianghaolu changed the title WebApp: Domain CRUD App Service: Domain CRUD Nov 1, 2016
@jianghaolu

Copy link
Copy Markdown
Contributor Author

Can we merge this yet? The country codes are useful for CDN too.

@martinsawicki martinsawicki merged commit 6756f86 into Azure:master Nov 8, 2016
jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this pull request Feb 27, 2017
sima-zhu pushed a commit to sima-zhu/azure-sdk-for-java that referenced this pull request Mar 21, 2019
* Fixing minor validation errors

- Fixing description rule to allow references to define a description
- Fixing AutoRest logging output to avoid throwing NRE when an error is logged without an exception
- Changing the message that gets output for validation errors to make it more useful

* Adding a validation test that validates a clean spec

- This verifies that rules are not unintentionally being returned for specs that don't have the issue. If a rule is added that causes this test to fail, this spec should be updated so that it passes those rules (and verify that the rule isn't being triggered inadvertently)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants