canonical / canonical/cloud-init

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

Open
#2,519 0 comments 0 reactions 0 assignees View on GitHub
bug launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1413788](https://bugs.launchpad.net/cloud-init/+bug/1413788)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2015-01-22T22:56:42.968307+00:00
date_fix_committed = None
date_fix_released = None
id = 1413788
importance = undecided
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1413788
milestone = None
owner = mmorais
owner_name = Marco Morais
private = False
status = confirmed
submitter = mmorais
submitter_name = Marco Morais
tags = []
duplicates = []

_Launchpad user **Marco Morais(mmorais)** wrote on 2015-01-22T22:56:42.968307+00:00_

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.