Skip to content

Commit

Permalink
get_sg_from_sd
Browse files Browse the repository at this point in the history
  • Loading branch information
grzn committed Mar 22, 2015
1 parent 05d38eb commit b8d4ffc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/infi/sgutils/sg_map/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ def get_sd_to_hctl_mappings():
def get_hctl_to_sd_mappings():
return {hctl:device_path for device_path,hctl in get_sd_to_hctl_mappings().items()}

def get_hctl_to_sg_mappings():
return {hctl:device_path for device_path,hctl in get_sg_to_hctl_mappings().items()}

def get_sd_from_sg(sg):
hctl = get_hctl_for_sg_device(sg)
return get_hctl_to_sd_mappings()[hctl]

def get_sg_from_sd(sd):
hctl = get_hctl_for_sd_device(sd)
return get_hctl_to_sg_mappings()[hctl]

0 comments on commit b8d4ffc

Please sign in to comment.