'Retrieve OS object based on id, unique URI identifier of the OS
:param os_name: id - the unique operating systemidentifier
e.g. http://fedoraproject.org/fedora/21,
http://microsoft.com/win/xp,
or a
short-id - the short name of the OS
e.g. fedora21, winxp
:returns: The operation system object Libosinfo.Os
:raise exception.OsInfoNotFound: If os hasn\'t been found'

def get_os(self, os_name):

    if (libosinfo is None):
        return
    if (not os_name):
        raise exception.OsInfoNotFound(os_name='Empty')
    fltr = libosinfo.Filter.new()
    flt_field = ('id' if os_name.startswith('http') else 'short-id')
    fltr.add_constraint(flt_field, os_name)
    filtered = self.oslist.new_filtered(fltr)
    list_len = filtered.get_length()
    if (not list_len):
        raise exception.OsInfoNotFound(os_name=os_name)
    return filtered.get_nth(0)
