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

App Service: Domain CRUD #1254

Merged
merged 19 commits into from
Nov 8, 2016
Merged

App Service: Domain CRUD #1254

merged 19 commits into from
Nov 8, 2016

Conversation

jianghaolu
Copy link
Contributor

@jianghaolu jianghaolu commented Oct 31, 2016

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");

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");

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
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");

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
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();

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
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 hostnames for the web app that are enabled. Hostnames need to be
* assigned and enabled. If some hostnames are assigned but not enabled
* the app is not served on those hostnames.
* @return host names for the web app that are enabled
*/
List<String> enabledHostNames();

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
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.

@@ -194,7 +168,7 @@
*/
String defaultHostName();

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

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
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.

@@ -194,7 +168,7 @@
*/
String defaultHostName();

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

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)

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
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
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