зеркало из https://github.com/microsoft/lisa.git
feature: rename check_supported to create_setting
This commit is contained in:
Родитель
70d51489c6
Коммит
5c98549ab3
|
@ -77,11 +77,12 @@ class Feature(InitializableMixin):
|
|||
...
|
||||
|
||||
@classmethod
|
||||
def check_supported(
|
||||
def create_setting(
|
||||
cls, *args: Any, **kwargs: Any
|
||||
) -> Optional[schema.FeatureSettings]:
|
||||
"""
|
||||
It's called in platform to check if a node support the feature or not.
|
||||
If it's supported, create a setting.
|
||||
"""
|
||||
return None
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT license.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from lisa import schema
|
||||
from lisa.feature import Feature
|
||||
|
||||
FEATURE_NAME_ISOLATED_RESOURCE = "isolated_resource"
|
||||
|
@ -25,12 +22,3 @@ class IsolatedResource(Feature):
|
|||
|
||||
def enabled(self) -> bool:
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def check_supported(
|
||||
cls, *args: Any, **kwargs: Any
|
||||
) -> Optional[schema.FeatureSettings]:
|
||||
"""
|
||||
It's called in platform to check if a node support the feature or not.
|
||||
"""
|
||||
return None
|
||||
|
|
|
@ -1374,7 +1374,7 @@ class IsolatedResource(AzureFeatureMixin, features.IsolatedResource):
|
|||
)
|
||||
|
||||
@classmethod
|
||||
def check_supported(
|
||||
def create_setting(
|
||||
cls, *args: Any, **kwargs: Any
|
||||
) -> Optional[schema.FeatureSettings]:
|
||||
resource_sku: Any = kwargs.get("resource_sku")
|
||||
|
|
|
@ -1577,7 +1577,7 @@ class AzurePlatform(Platform):
|
|||
# handled by node_space directly.
|
||||
continue
|
||||
|
||||
feature_setting = supported_feature.check_supported(
|
||||
feature_setting = supported_feature.create_setting(
|
||||
raw_capabilities=azure_raw_capabilities, resource_sku=resource_sku
|
||||
)
|
||||
if feature_setting:
|
||||
|
|
Загрузка…
Ссылка в новой задаче