(self)
return self._check_volumes()
Set the volume bindings string for container run command
Set the volume bindings string for container run command
Set the volume bindings string for container run command
def _set_volume_bindings(self):
        """Set the volume bindings string for container run command"""
        # predefined volume bindings --sysdirs --hostauth --dri
        if not self.opt["nosysdirs"]:
            self.opt["vol"].extend(Config.conf['sysdirs_list'])
        if self.opt["hostauth"]:
            self.opt["vol"].extend(self.hostauth_list)
        if self.opt["dri"]:
            self.opt["vol"].extend(Config.conf['dri_list'])
        home = self._get_bindhome()
        if home:
            self.opt["vol"].append(home)
        # remove directory bindings specified with --novol
        for novolume in list(self.opt["novol"]):
            found = False
            for vol in list(self.opt["vol"]):
                if novolume in (vol, vol.split(':')[0]):
                    self.opt["vol"].remove(vol)
                    found = True
            if not found:
                Msg().err("Warning: --novol %s not in volumes list" %
                          novolume, l=Msg.WAR)
        return self._check_volumes()
def _set_volume_bindings ( self ) : # predefined volume bindings --sysdirs --hostauth --dri if not self . opt [ "nosysdirs" ] : self . opt [ "vol" ] . extend ( Config . conf [ 'sysdirs_list' ] ) if self . opt [ "hostauth" ] : self . opt [ "vol" ] . extend ( self . hostauth_list ) if self . opt [ "dri" ] : self . opt [ "vol" ] . extend ( Config . conf [ 'dri_list' ] ) home = self . _get_bindhome ( ) if home : self . opt [ "vol" ] . append ( home ) # remove directory bindings specified with --novol for novolume in list ( self . opt [ "novol" ] ) : found = False for vol in list ( self . opt [ "vol" ] ) : if novolume in ( vol , vol . split ( ':' ) [ 0 ] ) : self . opt [ "vol" ] . remove ( vol ) found = True if not found : Msg ( ) . err ( "Warning: --novol %s not in volumes list" % novolume , l = Msg . WAR ) return self . _check_volumes ( )