-
Notifications
You must be signed in to change notification settings - Fork 174
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
Provider Improvements and Fixes #1249
Provider Improvements and Fixes #1249
Commits on Jul 26, 2023
-
driver/provider: rename NFSPProviderDriver -> NFSProviderDriver
The typo has been in the class name since its introduction. The documentation contains the correct name "NFSProviderDriver" already. Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8ff4742 - Browse repository at this point
Copy the full SHA 8ff4742View commit details
Commits on Jul 28, 2023
-
resource: import NFSProvider, HTTPProvider
This allows the user to import these resources from labgrid.resource directly. Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7316e25 - Browse repository at this point
Copy the full SHA 7316e25View commit details -
driver/provider: fix BaseProviderDriver with local resources
The TFTPProvider, HTTPProvider and NFSProvider don't have a host property unlike the remote variants. Fix the `get_export_vars()` method by distinguishing local and remote resources: use the provider's host attribute for remote resources, otherwise return "localhost". Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e8dbe63 - Browse repository at this point
Copy the full SHA e8dbe63View commit details -
driver/provider: drop BaseProviderDriver.__attrs_post_init__()
There is no need to overwrite this method to only call the same method on super(). This is the default. Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1a53a26 - Browse repository at this point
Copy the full SHA 1a53a26View commit details -
util/managedfile: expose user cache path
This path will be used by the NFSProviderDriver in a future commit. Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 14a258e - Browse repository at this point
Copy the full SHA 14a258eView commit details -
driver/provider: adjust NFSProviderDriver to NFS mounting use cases
During the introduction of the provider drivers, it was assumed all provider drivers work the same way: by relying on the `internal`/`external` attributes of their corresponding provider resource and symlinking the required file (either from /var/cache/labgrid/$USER/$HASH/file or the given path, in case it's locally available) to the `internal` path. For the target, the file is now expected to be available below `external` as returned by `stage()`. This, however, does not work for NFS: all NFS servers known to me don't touch the symlinks, meaning in our case that they point to a location not exported via NFS. Exporting and mounting these destinations to the same location is impractical at best or does not work at all. On top of that, the `internal`/`external` lingo does not fit the NFS mount use case. To improve this situation, introduce a custom `stage()` method for the NFSProviderDriver: assume that /var/cache/labgrid is exported via NFS, always copy the file to be staged there (even if it would be locally available) and return an NFSFile object containing the information required to mount and access the NFS share: host, export and the file path relative to the export. Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a092969 - Browse repository at this point
Copy the full SHA a092969View commit details -
resource: do not let (Remote)NFSProvider inherit from (Remote)BasePro…
…vider Now that the NFSProviderDriver no longer relies on the `internal`/`external` attributes of the (Remote)NFSProvider resource, let the NFSProvider inherit from Resource directly, so specifying these obsolete attributes is no longer required. The same applies to the RemoteNFSProvider which now inherits from NetworkResource directly. Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1a66ea5 - Browse repository at this point
Copy the full SHA 1a66ea5View commit details -
doc/configuration: document remote provider arguments and provide exa…
…mples Signed-off-by: Bastian Krause <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c345273 - Browse repository at this point
Copy the full SHA c345273View commit details