← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1413788] [NEW] inconsistent parameter list in get_hostname method for subclasses of sources.DataSource

 

Public bug reported:

The sources.DataSource class has method defined as:
   def get_hostname(self, fqdn=False, resolve_ip=False)

The parameter list in the following subclasses of sources.DataSource is not consistent with this method (see [1] for details):
DataSourceDigitalOcean
DataSourceGCE

[1] 
$ find cloudinit/sources/ -type f | xargs grep 'def get_hostname'
cloudinit/sources//init.py: def get_hostname(self, fqdn=False, resolve_ip=False):
cloudinit/sources//DataSourceCloudSigma.py: def get_hostname(self, fqdn=False, resolve_ip=False):
cloudinit/sources//DataSourceDigitalOcean.py: def get_hostname(self, fqdn=False):
cloudinit/sources//DataSourceGCE.py: def get_hostname(self, fqdn=False, _resolve_ip=False):
cloudinit/sources//DataSourceOpenNebula.py: def get_hostname(self, fqdn=False, resolve_ip=None):

** Affects: cloud-init
     Importance: Undecided
         Status: Confirmed

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1413788

Title:
  inconsistent parameter list in get_hostname method for subclasses of
  sources.DataSource

Status in Init scripts for use on cloud images:
  Confirmed

Bug description:
  The sources.DataSource class has method defined as:
     def get_hostname(self, fqdn=False, resolve_ip=False)

  The parameter list in the following subclasses of sources.DataSource is not consistent with this method (see [1] for details):
  DataSourceDigitalOcean
  DataSourceGCE

  [1] 
  $ find cloudinit/sources/ -type f | xargs grep 'def get_hostname'
  cloudinit/sources//init.py: def get_hostname(self, fqdn=False, resolve_ip=False):
  cloudinit/sources//DataSourceCloudSigma.py: def get_hostname(self, fqdn=False, resolve_ip=False):
  cloudinit/sources//DataSourceDigitalOcean.py: def get_hostname(self, fqdn=False):
  cloudinit/sources//DataSourceGCE.py: def get_hostname(self, fqdn=False, _resolve_ip=False):
  cloudinit/sources//DataSourceOpenNebula.py: def get_hostname(self, fqdn=False, resolve_ip=None):

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1413788/+subscriptions


Follow ups

References