Skip to content

Commit

Permalink
chore: change vmss casing across code base (Azure#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
serbrech authored and Justin Hackett committed Mar 14, 2019
1 parent 4f2e8ea commit 95398ac
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error {
} else {
for vmssListPage, err := sc.client.ListVirtualMachineScaleSets(ctx, sc.resourceGroupName); vmssListPage.NotDone(); err = vmssListPage.NextWithContext(ctx) {
if err != nil {
return errors.Wrap(err, "failed to get vmss list in the resource group")
return errors.Wrap(err, "failed to get VMSS list in the resource group")
}
for _, vmss := range vmssListPage.Values() {
vmName := *vmss.Name
Expand Down
18 changes: 9 additions & 9 deletions pkg/api/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ func TestAcceleratedNetworking(t *testing.T) {
isScale := true
mockCS.SetPropertiesDefaults(false, isScale)

// In scale scenario, nil AcceleratedNetworkingEnabled should always render as false (i.e., we never turn on this feature on an existing agent pool / vmss that didn't have it before)
// In scale scenario, nil AcceleratedNetworkingEnabled should always render as false (i.e., we never turn on this feature on an existing agent pool / VMSS that didn't have it before)
if to.Bool(mockCS.Properties.AgentPoolProfiles[0].AcceleratedNetworkingEnabled) {
t.Errorf("expected nil acceleratedNetworkingEnabled to be false after upgrade, instead got %t", to.Bool(mockCS.Properties.AgentPoolProfiles[0].AcceleratedNetworkingEnabled))
}
// In scale scenario, nil AcceleratedNetworkingEnabledWindows should always render as false (i.e., we never turn on this feature on an existing vm that didn't have it before)
// In scale scenario, nil AcceleratedNetworkingEnabledWindows should always render as false (i.e., we never turn on this feature on an existing VM that didn't have it before)
if to.Bool(mockCS.Properties.AgentPoolProfiles[0].AcceleratedNetworkingEnabledWindows) {
t.Errorf("expected nil acceleratedNetworkingEnabledWindows to be false after upgrade, instead got %t", to.Bool(mockCS.Properties.AgentPoolProfiles[0].AcceleratedNetworkingEnabledWindows))
}
Expand Down Expand Up @@ -467,7 +467,7 @@ func TestVMSSOverProvisioning(t *testing.T) {
isScale := true
mockCS.SetPropertiesDefaults(false, isScale)

// In scale scenario, nil VMSSOverProvisioningEnabled should always render as false (i.e., we never turn on this feature on an existing agent pool / vmss that didn't have it before)
// In scale scenario, nil VMSSOverProvisioningEnabled should always render as false (i.e., we never turn on this feature on an existing agent pool / VMSS that didn't have it before)
if to.Bool(mockCS.Properties.AgentPoolProfiles[0].VMSSOverProvisioningEnabled) {
t.Errorf("expected nil VMSSOverProvisioningEnabled to be false after upgrade, instead got %t", to.Bool(mockCS.Properties.AgentPoolProfiles[0].VMSSOverProvisioningEnabled))
}
Expand Down Expand Up @@ -846,7 +846,7 @@ func TestMasterProfileDefaults(t *testing.T) {
properties.MasterProfile.FirstConsecutiveStaticIP, "10.255.255.5")
}

// this validates default vmss masterProfile configuration
// this validates default VMSS masterProfile configuration
mockCS = getMockBaseContainerService("1.10.3")
properties = mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
Expand Down Expand Up @@ -922,7 +922,7 @@ func TestMasterProfileDefaults(t *testing.T) {
properties.MasterProfile.FirstConsecutiveStaticIP, "10.239.255.239")
}

// this validates default vmss masterProfile configuration, AzureCNI, and custom vnet
// this validates default VMSS masterProfile configuration, AzureCNI, and custom VNET
mockCS = getMockBaseContainerService("1.10.3")
properties = mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
Expand Down Expand Up @@ -1079,7 +1079,7 @@ func TestIsAzureCNINetworkmonitorAddon(t *testing.T) {

// TestSetVMSSDefaultsAndZones covers tests for setVMSSDefaultsForAgents and masters
func TestSetVMSSDefaultsAndZones(t *testing.T) {
// masters with vmss and no zones
// masters with VMSS and no zones
mockCS := getMockBaseContainerService("1.12.0")
properties := mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
Expand All @@ -1093,7 +1093,7 @@ func TestSetVMSSDefaultsAndZones(t *testing.T) {
t.Fatalf("OrchestratorProfile.KubernetesConfig.LoadBalancerSku did not have the expected configuration, got %s, expected %s",
properties.OrchestratorProfile.KubernetesConfig.LoadBalancerSku, DefaultLoadBalancerSku)
}
// masters with vmss and zones
// masters with VMSS and zones
mockCS = getMockBaseContainerService("1.12.0")
properties = mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
Expand All @@ -1118,7 +1118,7 @@ func TestSetVMSSDefaultsAndZones(t *testing.T) {
t.Fatalf("OrchestratorProfile.KubernetesConfig.ExcludeMasterFromStandardLB did not have the expected configuration, got %t, expected %t",
*properties.OrchestratorProfile.KubernetesConfig.ExcludeMasterFromStandardLB, excludeMaster)
}
// agents with vmss and no zones
// agents with VMSS and no zones
mockCS = getMockBaseContainerService("1.12.0")
properties = mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
Expand All @@ -1132,7 +1132,7 @@ func TestSetVMSSDefaultsAndZones(t *testing.T) {
t.Fatalf("OrchestratorProfile.KubernetesConfig.LoadBalancerSku did not have the expected configuration, got %s, expected %s",
properties.OrchestratorProfile.KubernetesConfig.LoadBalancerSku, DefaultLoadBalancerSku)
}
// agents with vmss and zones
// agents with VMSS and zones
mockCS = getMockBaseContainerService("1.12.0")
properties = mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/vlabs/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestMasterProfile(t *testing.T) {
t.Fatalf("unexpectedly detected MasterProfile.AvailabilitySets == VirtualMachineScaleSets after unmarshal")
}

// With vmss and zones
// With VMSS and zones
MasterProfileText = `{ "count": 3, "vmSize": "Standard_D2_v2", "availabilityProfile": "VirtualMachineScaleSets", "storageProfile" : "ManagedDisks", "diskSizesGB" : [750, 250, 600, 1000], "AvailabilityZones": ["1","2"] }`
mp = &MasterProfile{}
if e := json.Unmarshal([]byte(MasterProfileText), mp); e != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ func TestProperties_ValidateManagedIdentity(t *testing.T) {
agentPoolProfiles []*AgentPoolProfile
}{
{
name: "use managed identity with master vmss",
name: "use managed identity with master VMSS",
orchestratorRelease: "1.11",
useManagedIdentity: true,
userAssignedID: "utaksenginetestid",
Expand Down Expand Up @@ -1500,7 +1500,7 @@ func TestProperties_ValidateManagedIdentity(t *testing.T) {
expectedErr: "user assigned identity can only be used with Kubernetes 1.12.0 or above. Please specify \"orchestratorRelease\": \"1.12\"",
},
{
name: "user master vmss with empty user assigned ID",
name: "user master VMSS with empty user assigned ID",
orchestratorRelease: "1.12",
useManagedIdentity: true,
masterProfile: MasterProfile{
Expand Down
2 changes: 1 addition & 1 deletion pkg/armhelpers/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (az *AzureClient) DeleteVirtualMachine(ctx context.Context, resourceGroup,
return err
}

// ListVirtualMachineScaleSets returns (the first page of) the vmss resources in the specified resource group.
// ListVirtualMachineScaleSets returns (the first page of) the VMSS resources in the specified resource group.
func (az *AzureClient) ListVirtualMachineScaleSets(ctx context.Context, resourceGroup string) (VirtualMachineScaleSetListResultPage, error) {
page, err := az.virtualMachineScaleSetsClient.List(ctx, resourceGroup)
return &page, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/armhelpers/utils/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func Test_LinuxVMNameParts(t *testing.T) {
}
}

func Test_VmssNameParts(t *testing.T) {
func Test_VMSSNameParts(t *testing.T) {
data := []struct {
poolIdentifier, nameSuffix string
}{
Expand Down

0 comments on commit 95398ac

Please sign in to comment.