Merge pull request #119 from Snawoot/ws2016_2019

Automation: Windows Server 2016, 2019
This commit is contained in:
Snawoot 2019-06-09 22:45:35 +03:00 committed by GitHub
commit 25faa31ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 113 additions and 9 deletions

View File

@ -50,6 +50,10 @@ All scripts may be used both as standalone application and importable module. Fo
[ [
"DriverAttributes", "DriverAttributes",
"Name" "Name"
],
[
"ChannelAttributes",
"OS"
] ]
], ],
"channels": [ "channels": [
@ -187,6 +191,29 @@ All scripts may be used both as standalone application and importable module. Fo
"product": "QuadroMobile", "product": "QuadroMobile",
"certlevel": "All" "certlevel": "All"
} }
},
{
"type": "nvidia_downloads",
"name": "downloads win server quadro certified",
"params": {
"os": "WindowsServer2012R2_64",
"product": "Quadro",
"certlevel": "Certified"
}
},
{
"type": "nvidia_downloads",
"name": "downloads win server 2019 quadro certified",
"params": {
"os": "WindowsServer2019",
"product": "Quadro",
"certlevel": "Certified"
}
},
{
"type": "cuda_downloads",
"name": "cuda toolkit tracker",
"params": {}
} }
], ],
"notifiers": [ "notifiers": [
@ -261,7 +288,7 @@ Type: `nvidia_downloads`
Params: Params:
* `os` - OS family, version and bitness. Allowed values: `Linux_32`, `Linux_64`, `Windows7_32`, `Windows7_64`, `Windows10_32`, `Windows10_64`, `WindowsServer2012R2_32`, `WindowsServer2012R2_64`. Default: `Linux_64`. * `os` - OS family, version and bitness. Allowed values: `Linux_32`, `Linux_64`, `Windows7_32`, `Windows7_64`, `Windows10_32`, `Windows10_64`, `WindowsServer2012R2_32`, `WindowsServer2012R2_64`, `WindowsServer2016`, `WindowsServer2019`. Default: `Linux_64`.
* `product` - product kind. Allowed values: `GeForce`, `GeForceMobile`, `Quadro`, `QuadroMobile`. Default: `GeForce`. * `product` - product kind. Allowed values: `GeForce`, `GeForceMobile`, `Quadro`, `QuadroMobile`. Default: `GeForce`.
* `certlevel` - driver certification level. Allowed values: `All` - any certification level, `Beta` - beta drivers, `Certified` - WHQL certified in Windows case and Nvidia certified in Linux case, `ODE` - Optimal Driver for Enterprise (Quadro driver), `QNF` - Quadro New Feature (Quadro driver). Default: `All`. * `certlevel` - driver certification level. Allowed values: `All` - any certification level, `Beta` - beta drivers, `Certified` - WHQL certified in Windows case and Nvidia certified in Linux case, `ODE` - Optimal Driver for Enterprise (Quadro driver), `QNF` - Quadro New Feature (Quadro driver). Default: `All`.
* `driver_type` - driver type. Allowed values: `Standard`, `DCH`. At this moment DCH driver appears to exists only for some product families and only for Windows 10 x64. Default: `Standard`. * `driver_type` - driver type. Allowed values: `Standard`, `DCH`. At this moment DCH driver appears to exists only for some product families and only for Windows 10 x64. Default: `Standard`.

View File

@ -21,6 +21,8 @@ class OS(enum.Enum):
Windows10_64 = 57 Windows10_64 = 57
WindowsServer2012R2_32 = 32 WindowsServer2012R2_32 = 32
WindowsServer2012R2_64 = 44 WindowsServer2012R2_64 = 44
WindowsServer2016 = 74
WindowsServer2019 = 119
def __str__(self): def __str__(self):
return self.name return self.name

View File

@ -13,6 +13,10 @@
[ [
"DriverAttributes", "DriverAttributes",
"Name" "Name"
],
[
"ChannelAttributes",
"OS"
] ]
], ],
"channels": [ "channels": [
@ -176,6 +180,15 @@
"certlevel": "Certified" "certlevel": "Certified"
} }
}, },
{
"type": "nvidia_downloads",
"name": "downloads win server 2019 quadro certified",
"params": {
"os": "WindowsServer2019",
"product": "Quadro",
"certlevel": "Certified"
}
},
{ {
"type": "cuda_downloads", "type": "cuda_downloads",
"name": "cuda toolkit tracker", "name": "cuda toolkit tracker",

View File

@ -58,8 +58,11 @@ class Hasher:
def _eval_key_component(self, obj, component_path): def _eval_key_component(self, obj, component_path):
res = obj res = obj
try:
for path_component in component_path: for path_component in component_path:
res = res[path_component] res = res[path_component]
except (KeyError, IndexError):
return b''
return str(res).encode('utf-8') return str(res).encode('utf-8')
def hash_object(self, obj): def hash_object(self, obj):
@ -147,14 +150,53 @@ class BaseChannel(ABC):
class GFEClientChannel(BaseChannel): class GFEClientChannel(BaseChannel):
def __init__(self, name, **kwargs): def __init__(self, name, notebook=False,
x86_64=True,
os_version="10.0",
os_build="17763",
language=1033,
beta=False,
dch=False,
crd=False,
timeout=10):
self.name = name self.name = name
self._kwargs = kwargs self._notebook = notebook
self._x86_64 = x86_64
self._os_version = os_version
self._os_build = os_build
self._language = language
self._beta = beta
self._dch = dch
self._crd = crd
self._timeout = timeout
gfe_get_driver = importlib.import_module('gfe_get_driver') gfe_get_driver = importlib.import_module('gfe_get_driver')
self._get_latest_driver = gfe_get_driver.get_latest_geforce_driver self._get_latest_driver = gfe_get_driver.get_latest_geforce_driver
def get_latest_driver(self): def get_latest_driver(self):
return self._get_latest_driver(**self._kwargs) res = self._get_latest_driver(notebook=self._notebook,
x86_64=self._x86_64,
os_version=self._os_version,
os_build=self._os_build,
language=self._language,
beta=self._beta,
dch=self._dch,
crd=self._crd,
timeout=self._timeout)
res.update({
'ChannelAttributes': {
'Name': self.name,
'Type': self.__class__.__name__,
'OS': 'Windows%d_%d' % (float(self._os_version),
64 if self._x86_64 else 32),
'OSBuild': self._os_build,
'Language': self._language,
'Beta': self._beta,
'DCH': self._dch,
'CRD': self._crd,
'Mobile': self._notebook,
}
})
return res
class NvidiaDownloadsChannel(BaseChannel): class NvidiaDownloadsChannel(BaseChannel):
@ -193,6 +235,16 @@ class NvidiaDownloadsChannel(BaseChannel):
'Version': latest['version'], 'Version': latest['version'],
'Name': latest['name'], 'Name': latest['name'],
'NameLocalized': latest['name'], 'NameLocalized': latest['name'],
},
'ChannelAttributes': {
'Name': self.name,
'Type': self.__class__.__name__,
'OS': self._os.name,
'Product': self._product.name,
'CertLevel': self._certlevel.name,
'DriverType': self._driver_type.name,
'Lang': self._lang.name,
'CudaVer': self._cuda_ver.name,
} }
} }

View File

@ -54,6 +54,9 @@ class ExtractException(Exception):
class PatternNotFoundException(Exception): class PatternNotFoundException(Exception):
pass pass
class UnknownPlatformException(Exception):
pass
class ExtractedTarget: class ExtractedTarget:
name = None name = None
@ -168,9 +171,16 @@ def main():
"300": "", "300": "",
"301": "nsd_", "301": "nsd_",
} }
installer_basename = os.path.basename(args.installer_file) installer_name = os.path.basename(args.installer_file).lower()
os_prefix = ('ws2012_x64' if 'winserv' in installer_basename.lower() if 'winserv2008' in installer_name:
else 'win10_x64') os_prefix = 'ws2012_x64'
elif 'winserv-2016' in installer_name:
os_prefix = 'ws2016_x64'
elif 'win10' in installer_name:
os_prefix = 'win10_x64'
else:
raise UnknownPlatformException("Can't infer platform from filename %s"
% (repr(installer_name),))
driver_name = drv_prefix[product_type] + version driver_name = drv_prefix[product_type] + version
out_dir = os.path.join( out_dir = os.path.join(
os.path.dirname( os.path.dirname(