Skip to content

Commit c3a066b

Browse files
committed
refactor(samples): lint fix
1 parent bc0e519 commit c3a066b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

compute/cloud-client/src/main/java/compute/CreateInstanceFromTemplate.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717

1818
package compute;
19+
1920
// [START compute_instances_create_from_template]
2021

2122
import com.google.cloud.compute.v1.InsertInstanceRequest;
@@ -44,13 +45,13 @@ public static void main(String[] args)
4445
String projectId = "your-project-id";
4546
String zone = "zone-name";
4647
String instanceName = "instance-name";
47-
String instanceTemplateURL = "instance-template-url";
48-
createInstanceFromTemplate(projectId, zone, instanceName, instanceTemplateURL);
48+
String instanceTemplateUrl = "instance-template-url";
49+
createInstanceFromTemplate(projectId, zone, instanceName, instanceTemplateUrl);
4950
}
5051

5152
// Create a new instance from template in the specified project and zone.
5253
public static void createInstanceFromTemplate(String projectId, String zone, String instanceName,
53-
String instanceTemplateURL)
54+
String instanceTemplateUrl)
5455
throws IOException, ExecutionException, InterruptedException {
5556

5657
try (InstancesClient instancesClient = InstancesClient.create();
@@ -60,7 +61,7 @@ public static void createInstanceFromTemplate(String projectId, String zone, Str
6061
.setProject(projectId)
6162
.setZone(zone)
6263
.setInstanceResource(Instance.newBuilder().setName(instanceName).build())
63-
.setSourceInstanceTemplate(instanceTemplateURL).build();
64+
.setSourceInstanceTemplate(instanceTemplateUrl).build();
6465

6566
Operation operation = instancesClient.insertCallable().futureCall(insertInstanceRequest)
6667
.get();

compute/cloud-client/src/main/java/compute/CreateInstanceFromTemplateWithOverrides.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
package compute;
18+
1819
// [START compute_instances_create_from_template_with_overrides]
1920

2021
import com.google.cloud.compute.v1.AttachedDisk;
@@ -58,7 +59,8 @@ public static void main(String[] args)
5859
createInstanceFromTemplateWithOverrides(projectId, zone, instanceName, instanceTemplateName);
5960
}
6061

61-
// Creates a Compute Engine VM instance from an instance template, but overrides the disk and machine type options in the template.
62+
// Creates a Compute Engine VM instance from an instance template,
63+
// but overrides the disk and machine type options in the template.
6264
public static void createInstanceFromTemplateWithOverrides(String projectId, String zone,
6365
String instanceName, String instanceTemplateName)
6466
throws IOException, ExecutionException, InterruptedException {

compute/cloud-client/src/main/java/compute/CreateTemplateWithSubnet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class CreateTemplateWithSubnet {
3232

3333
public static void main(String[] args)
3434
throws IOException, ExecutionException, InterruptedException {
35-
/*
35+
/*
3636
TODO(developer): Replace these variables before running the sample.
3737
projectId: project ID or project number of the Cloud project you use.
3838
network: the network to be used in the new template. This value uses
3939
the following format: "projects/{project}/global/networks/{network}"
4040
subnetwork: the subnetwork to be used in the new template. This value
4141
uses the following format: "projects/{project}/regions/{region}/subnetworks/{subnetwork}"
4242
templateName: name of the new template to create.
43-
*/
43+
*/
4444
String projectId = "your-project-id";
4545
String network = "projects/{project}/global/networks/{network}";
4646
String subnetwork = "projects/{project}/regions/{region}/subnetworks/{subnetwork}";

0 commit comments

Comments
 (0)