Sfctl 9.0.0 (#213)
* setting up initial part for release sdk
* removed custom sdk
* fixed version specific test issues.
* fixed version check
* change back the allowable_lines_not_found
* Revert "removed custom sdk"
This reverts commit 0fc2ccf6e3
.
* potential solution for flipping libraries
* fixed spacing
* fixed linting error
* fixed linting error
* fixed linting error
* removed unreleased line
This commit is contained in:
Родитель
628b5c1044
Коммит
e20068974e
|
@ -16,7 +16,7 @@ To get started, after installation run the following:
|
||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Unreleased
|
9.0.0
|
||||||
----------
|
----------
|
||||||
- Added configuration overrides node commands. These commands will be available in the Service fabric runtime 7.0 version (#206)
|
- Added configuration overrides node commands. These commands will be available in the Service fabric runtime 7.0 version (#206)
|
||||||
- Provide option to compress packages on application upload. By default, the newly generated compressed package is deleted after successful upload. (#191)
|
- Provide option to compress packages on application upload. By default, the newly generated compressed package is deleted after successful upload. (#191)
|
||||||
|
|
|
@ -17,7 +17,7 @@ def read(fname):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='sfctl',
|
name='sfctl',
|
||||||
version='8.0.0',
|
version='9.0.0',
|
||||||
description='Azure Service Fabric command line',
|
description='Azure Service Fabric command line',
|
||||||
long_description=read('README.rst'),
|
long_description=read('README.rst'),
|
||||||
url='https://github.com/Azure/service-fabric-cli',
|
url='https://github.com/Azure/service-fabric-cli',
|
||||||
|
@ -48,7 +48,7 @@ setup(
|
||||||
'msrest>=0.5.0',
|
'msrest>=0.5.0',
|
||||||
'msrestazure',
|
'msrestazure',
|
||||||
'requests',
|
'requests',
|
||||||
'azure-servicefabric==6.5.0.0',
|
'azure-servicefabric==7.0.0.0',
|
||||||
'adal',
|
'adal',
|
||||||
'future',
|
'future',
|
||||||
'applicationinsights',
|
'applicationinsights',
|
||||||
|
|
|
@ -272,9 +272,9 @@ def sfctl_cluster_version_matches(cluster_version, sfctl_version):
|
||||||
:return: True if they are a match. False otherwise.
|
:return: True if they are a match. False otherwise.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if sfctl_version in ['8.0.0']:
|
if sfctl_version in ['9.0.0']:
|
||||||
|
|
||||||
return cluster_version.startswith('6.5')
|
return cluster_version.startswith('7.0')
|
||||||
|
|
||||||
# If we forget to update this code before a new release, the tests which call this method
|
# If we forget to update this code before a new release, the tests which call this method
|
||||||
# will fail.
|
# will fail.
|
||||||
|
|
|
@ -11,7 +11,7 @@ from knack.help_files import helps
|
||||||
helps[''] = """
|
helps[''] = """
|
||||||
type: group
|
type: group
|
||||||
short-summary: Commands for managing Service Fabric clusters
|
short-summary: Commands for managing Service Fabric clusters
|
||||||
and entities. This version is compatible with Service Fabric 6.5
|
and entities. This version is compatible with Service Fabric 7.0
|
||||||
runtime.
|
runtime.
|
||||||
long-summary: Commands follow the noun-verb pattern. See subgroups for more
|
long-summary: Commands follow the noun-verb pattern. See subgroups for more
|
||||||
information.
|
information.
|
||||||
|
|
|
@ -61,7 +61,7 @@ class ClusterTests(unittest.TestCase):
|
||||||
|
|
||||||
# An exception will be raised if the current cluster version doesn't exist in the function
|
# An exception will be raised if the current cluster version doesn't exist in the function
|
||||||
try:
|
try:
|
||||||
self.assertTrue(sfctl_cluster_version_matches('6.5', current_sfctl_version),
|
self.assertTrue(sfctl_cluster_version_matches('7.0', current_sfctl_version),
|
||||||
msg='You are most likely getting this error because we need to '
|
msg='You are most likely getting this error because we need to '
|
||||||
'update the method sfctl_cluster_version_matches in '
|
'update the method sfctl_cluster_version_matches in '
|
||||||
'custom_cluster so that it works with the '
|
'custom_cluster so that it works with the '
|
||||||
|
|
|
@ -88,7 +88,10 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
|
||||||
# A list of strings containing abs paths to the SDK api file and model files
|
# A list of strings containing abs paths to the SDK api file and model files
|
||||||
# start off containing the SDK API file
|
# start off containing the SDK API file
|
||||||
# List of strings
|
# List of strings
|
||||||
sdk_files_path = [join(sdk_path, 'service_fabric_client_ap_is.py')]
|
# Only one service_fabric_client_ap_is.py should exist but can appear differently depending on if its custom sdk
|
||||||
|
# or if its the official release.
|
||||||
|
sdk_files_path = [join(sdk_path, '_service_fabric_client_ap_is.py'),
|
||||||
|
join(sdk_path, 'service_fabric_client_ap_is.py')]
|
||||||
|
|
||||||
# Add all the models files
|
# Add all the models files
|
||||||
models_path = join(sdk_path, 'models')
|
models_path = join(sdk_path, 'models')
|
||||||
|
@ -97,8 +100,11 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
|
||||||
sdk_files_path.append(join(models_path, file_name))
|
sdk_files_path.append(join(models_path, file_name))
|
||||||
|
|
||||||
for python_file_path in sdk_files_path:
|
for python_file_path in sdk_files_path:
|
||||||
lines = [line.strip() for line in open(python_file_path)]
|
try:
|
||||||
doc_strings.append(' '.join(lines).lower())
|
lines = [line.strip() for line in open(python_file_path)]
|
||||||
|
doc_strings.append(' '.join(lines).lower())
|
||||||
|
except: # pylint: disable=bare-except
|
||||||
|
print("missing - {0}".format(python_file_path))
|
||||||
|
|
||||||
return doc_strings
|
return doc_strings
|
||||||
|
|
||||||
|
@ -224,7 +230,7 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
|
||||||
print()
|
print()
|
||||||
print(line)
|
print(line)
|
||||||
|
|
||||||
allowable_lines_not_found = 85
|
allowable_lines_not_found = [148, 85]
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print('The total number of lines compared is ' + str(len(custom_help_lines)))
|
print('The total number of lines compared is ' + str(len(custom_help_lines)))
|
||||||
|
@ -234,6 +240,5 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
|
||||||
str(len(CustomHelpTextCorrectnessTests.exclusion_list)))
|
str(len(CustomHelpTextCorrectnessTests.exclusion_list)))
|
||||||
|
|
||||||
# Assert if there are any lines which do not match.
|
# Assert if there are any lines which do not match.
|
||||||
self.assertEqual(len(lines_not_found), allowable_lines_not_found,
|
self.assertTrue(len(lines_not_found) in allowable_lines_not_found,
|
||||||
msg='The allowable mismatched documentation lines does not match '
|
msg='The allowable mismatched documentation lines does not match the actual number.')
|
||||||
'the actual number.')
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class VersionTests(unittest.TestCase):
|
||||||
|
|
||||||
note: this will require changing the sfctl_version on releases
|
note: this will require changing the sfctl_version on releases
|
||||||
"""
|
"""
|
||||||
sfctl_version = '8.0.0'
|
sfctl_version = '9.0.0'
|
||||||
|
|
||||||
pipe = Popen('sfctl --version', shell=True, stdout=PIPE, stderr=PIPE)
|
pipe = Popen('sfctl --version', shell=True, stdout=PIPE, stderr=PIPE)
|
||||||
# returned_string and err are returned as bytes
|
# returned_string and err are returned as bytes
|
||||||
|
|
Загрузка…
Ссылка в новой задаче