@@ -51,11 +51,11 @@ type Spec struct {
5151func (s * Service ) Get (ctx context.Context , spec interface {}) (interface {}, error ) {
5252 vmSpec , ok := spec .(* Spec )
5353 if ! ok {
54- return compute.VirtualMachine {}, errors .New ("invalid vm specification" )
54+ return compute.VirtualMachine {}, errors .New ("invalid VM specification" )
5555 }
5656 vm , err := s .Client .Get (ctx , s .Scope .ResourceGroup (), vmSpec .Name )
5757 if err != nil && azure .ResourceNotFound (err ) {
58- return nil , errors .Wrapf (err , "vm %s not found" , vmSpec .Name )
58+ return nil , errors .Wrapf (err , "VM %s not found" , vmSpec .Name )
5959 } else if err != nil {
6060 return vm , err
6161 }
@@ -79,22 +79,22 @@ func (s *Service) Get(ctx context.Context, spec interface{}) (interface{}, error
7979func (s * Service ) Reconcile (ctx context.Context , spec interface {}) error {
8080 vmSpec , ok := spec .(* Spec )
8181 if ! ok {
82- return errors .New ("invalid vm specification" )
82+ return errors .New ("invalid VM specification" )
8383 }
8484
8585 storageProfile , err := generateStorageProfile (* vmSpec )
8686 if err != nil {
8787 return err
8888 }
8989
90- klog .V (2 ).Infof ("getting nic %s" , vmSpec .NICName )
90+ klog .V (2 ).Infof ("getting NIC %s" , vmSpec .NICName )
9191 nic , err := s .InterfacesClient .Get (ctx , s .Scope .ResourceGroup (), vmSpec .NICName )
9292 if err != nil {
9393 return err
9494 }
95- klog .V (2 ).Infof ("got nic %s" , vmSpec .NICName )
95+ klog .V (2 ).Infof ("got NIC %s" , vmSpec .NICName )
9696
97- klog .V (2 ).Infof ("creating vm %s " , vmSpec .Name )
97+ klog .V (2 ).Infof ("creating VM %s " , vmSpec .Name )
9898
9999 sshKeyData := vmSpec .SSHKeyData
100100 if sshKeyData == "" {
@@ -174,27 +174,27 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error {
174174 return errors .Wrapf (err , "cannot create vm" )
175175 }
176176
177- klog .V (2 ).Infof ("successfully created vm %s " , vmSpec .Name )
177+ klog .V (2 ).Infof ("successfully created VM %s " , vmSpec .Name )
178178 return nil
179179}
180180
181181// Delete deletes the virtual machine with the provided name.
182182func (s * Service ) Delete (ctx context.Context , spec interface {}) error {
183183 vmSpec , ok := spec .(* Spec )
184184 if ! ok {
185- return errors .New ("invalid vm specification" )
185+ return errors .New ("invalid VM specification" )
186186 }
187- klog .V (2 ).Infof ("deleting vm %s " , vmSpec .Name )
187+ klog .V (2 ).Infof ("deleting VM %s " , vmSpec .Name )
188188 err := s .Client .Delete (ctx , s .Scope .ResourceGroup (), vmSpec .Name )
189189 if err != nil && azure .ResourceNotFound (err ) {
190190 // already deleted
191191 return nil
192192 }
193193 if err != nil {
194- return errors .Wrapf (err , "failed to delete vm %s in resource group %s" , vmSpec .Name , s .Scope .ResourceGroup ())
194+ return errors .Wrapf (err , "failed to delete VM %s in resource group %s" , vmSpec .Name , s .Scope .ResourceGroup ())
195195 }
196196
197- klog .V (2 ).Infof ("successfully deleted vm %s " , vmSpec .Name )
197+ klog .V (2 ).Infof ("successfully deleted VM %s " , vmSpec .Name )
198198 return nil
199199}
200200
0 commit comments