-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added availability flags and logic for genesis setting #77
Open
purnendu15
wants to merge
19
commits into
att-comdev:spyglass
Choose a base branch
from
purnendu15:spyglass
base: spyglass
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9b9f2b6
added availability flags and logic for genesis setting
purnendu15 aac940c
Merge remote-tracking branch 'upstream/spyglass' into spyglass
purnendu15 f8740f4
Added framework for extracting baremetal info for tugboat plugin
purnendu15 2ba0f37
base version of working tugboat plugin
purnendu15 4ad83a6
Added support for determining host type
purnendu15 ab2cbcb
Formatting, Logging Changes
purnendu15 6bed3de
Merge remote-tracking branch 'upstream/spyglass' into spyglass
purnendu15 b138e2d
Documentation Updates
purnendu15 61b3c08
Fixed bug to set node type in formation
purnendu15 06cc709
Adding a dummy site
purnendu15 b35c4b0
Adding tags for missing values while dictionary get
purnendu15 a714eed
Added sample tugboat excel file and spec
purnendu15 9e3b7a4
Suppress VLAN for ingress and oob
purnendu15 4252105
modified host profile extraction rule from excel file
purnendu15 d639abd
Changes to vlan id's and host profile identifiers
purnendu15 22acbab
removed unused functions
purnendu15 781c69f
modification for airship-seaworthy
purnendu15 84b195f
modification for pep8 confirmation
purnendu15 fbe8f9a
Added tugboat execution command using sample input files
purnendu15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -313,13 +313,19 @@ def get_hosts(self, region, rack=None): | |
control_hosts = device_api.zones_zone_id_control_nodes_get(zone_id) | ||
compute_hosts = device_api.zones_zone_id_devices_get( | ||
zone_id, type='KVM') | ||
|
||
hosts_list = [] | ||
genesis_set = False | ||
for host in control_hosts: | ||
self.device_name_id_mapping[host.aic_standard_name] = host.id | ||
# The first control node is designated as genesis node | ||
if genesis_set is False: | ||
node_type = 'genesis' | ||
genesis_set = True | ||
else: | ||
node_type = 'genesis' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. node_type should be genesis in else loop? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been fixed. It should be controller |
||
hosts_list.append({ | ||
'name': host.aic_standard_name, | ||
'type': 'controller', | ||
'type': node_type, | ||
'rack_name': host.rack_name, | ||
'host_profile': host.host_profile_name | ||
}) | ||
|
@@ -352,8 +358,9 @@ def get_networks(self, region): | |
vlan_api = swagger_client.VlansApi(self.formation_api_client) | ||
vlans = vlan_api.zones_zone_id_regions_region_id_vlans_get( | ||
zone_id, region_id) | ||
# Case when vlans list is empty from | ||
# zones_zone_id_regions_region_id_vlans_get | ||
# TWEAK(pg710r):Case when vlans list is empty from | ||
# zones_zone_id_regions_region_id_vlans_get. Ideally this should not | ||
# be the case | ||
if len(vlans) is 0: | ||
# get device-id from the first host and get the network details | ||
hosts = self.get_hosts(self.region) | ||
|
@@ -375,13 +382,6 @@ def get_networks(self, region): | |
tmp_vlan['subnet_level'] = vlan_.vlan.subnet_level | ||
vlans_list.append(tmp_vlan) | ||
|
||
# TODO(pg710r): hack to put dummy values for pxe | ||
tmp_vlan = {} | ||
tmp_vlan['name'] = 'pxe' | ||
tmp_vlan['vlan'] = '43' | ||
tmp_vlan['subnet'] = '172.30.4.0/25' | ||
tmp_vlan['gateway'] = '172.30.4.1' | ||
vlans_list.append(tmp_vlan) | ||
return vlans_list | ||
|
||
def get_ips(self, region, host=None): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a design rule to take first node as genesis or hardcoded?
Instead of introducing new flag, why cant the first element is taken out of control_host, handle genesis stuff. And then for loop from [1:]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left it for readability sake we can loop fron [1: ] also