Skip to content
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

Rdfg enhancements #84

Merged
merged 28 commits into from
Feb 19, 2020
Merged

Rdfg enhancements #84

merged 28 commits into from
Feb 19, 2020

Conversation

rawstorage
Copy link
Collaborator

Replication Enhancements

RDF functions added

-create_rdf_group
-modify_rdf_group
-delete_rdf_group
-get_rdf_port_connections
-get_rdf_director_port_details
-get_rdf_director_ports
-get_rdf_director
-get_rdf_director_list
-create_storage_group_from_rdfg

BugFix

update to rest_requests header parameter corrected to application-type line 54

Fix in CI_Test for effective_wwn functions and set initiator flags

rawstorage and others added 9 commits February 6, 2020 11:57
…ype header incorrectly in lowercase. Added skip to 2 tests in provisioning ci_tests for external wwn.
…ype header incorrectly in lowercase. Added skip to 2 tests in provisioning ci_tests for external wwn.
…on thanks to extra space with pluralisation. :(
csv reader that are used in csv writer. Added skips
to effective wwn tests where no effective wwn enabled
volumes can be found.
test to prevent issues where the in-use initiator that was selected
was in a group causing conflicts when attempting to set flags.
added create_storage_group_from_rdfg ci_test and unit test
@rawstorage rawstorage requested review from MichaelMcAleer, helenwalsh and odonos12 and removed request for MichaelMcAleer February 13, 2020 10:36
Copy link
Contributor

@helenwalsh helenwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few style issues only. Also, just for future reference, perhaps we separate the issues into pull requests so for example application-type fix and initiator group tests fix get their own pull request. Just a suggestion.

@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""replication.py."""
'''replication.py.'''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc strings should be in double quotes



class ReplicationFunctions(object):
"""ReplicationFunctions."""
'''ReplicationFunctions.'''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like they have been changed throughout the document. Please change them to ". Thanks

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Helen that was a find replace error.

Optional boolean parameters to set are "bypass", "metroBias", "star",
"immediate", "hop2", "consExempt", "force", "symForce".
Optional boolean parameters to set are 'bypass', 'metroBias', 'star',
'immediate', 'hop2', 'consExempt', 'force', 'symForce'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to avoid confusion. Having single quotes here is fine. It is also in the doc strings so less concerned with this anyway

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed back to original, this change was made in error


:param array_id: 12 digit serial number for PowerMax array -- str
:param director_id: identifier for director e.g. RF-1F -- str
:param filters: optional filters - dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit -- instead of -

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

:param array_id: 12 digit serial number for PowerMax array -- str
:param director_id: identifier for director e.g. RF-1F -- str
:param port_id: port number -- int
:returns: port details --dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - add a stace

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good eyes

remote_rdf_director_list = self.replication.get_rdf_director_list(
filters={'online': True})
for director in remote_rdf_director_list:
remote_rdf_director_port_list = \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brackets instead of \

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"""Helper function to get RDFG on arrays that is free for use

:returns: next RDF group number on local and remote array

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove empty line

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, found another like this

@@ -11,11 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""pyu4v_common_data.py."""
'''pyu4v_common_data.py.'''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double quotes

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@MichaelMcAleer MichaelMcAleer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stopped reviewing this, too much to add in one review.

Fix the parameters, their ordering, and collapse all the multi-line stuff to as few lines as possible to save on space in the overall file, it helps out IDEs load inspections faster. There is also a lot of trailing ) or } which could be moved up a line or two to further save space.

After these are done ill go through the code for problems

PyU4V/replication.py Show resolved Hide resolved
resource_level=SYMMETRIX, resource_level_id=array_id,
resource_type=RDF_DIRECTOR, resource_type_id=director_id,
resource=PORT, params=filters
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: move the ) to the previous line instead of a line of its own

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

resource_level=SYMMETRIX, resource_level_id=array_id,
resource_type=RDF_DIRECTOR, resource_type_id=director_id,
resource=PORT, resource_id=port_id
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Move ) to previous line

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

PyU4V/replication.py Show resolved Hide resolved
PyU4V/replication.py Show resolved Hide resolved
"action": "set_label"
}

elif rdfg_action == 'add_ports' or 'remove_ports':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wont work, second half of or statement will always evaluate to True because it is a populated string. Should be:

elif rdfg_action == 'add_ports' or rdfg_action == 'remove_ports':

A better implementation would be

elif rdfg_action in ['add_ports', 'remove_ports']:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed will need to re-run ci to verify still working

resource_level_id=array_id,
resource_type=RDF_GROUP,
resource_type_id=srdf_group_number,
payload=payload)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collapse these into a few lines, save space where possible

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

resource_level_id=array_id,
resource_type=RDF_GROUP,
resource_type_id=srdf_group_number,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move ) to previous line, collapse params to as few lines as possible

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done and collapsed

PyU4V/replication.py Outdated Show resolved Hide resolved
PyU4V/replication.py Outdated Show resolved Hide resolved
rawstorage and others added 8 commits February 13, 2020 16:00
csv reader that are used in csv writer. Added skips
to effective wwn tests where no effective wwn enabled
volumes can be found.
test to prevent issues where the in-use initiator that was selected
was in a group causing conflicts when attempting to set flags.
Copy link
Contributor

@MichaelMcAleer MichaelMcAleer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More changes required there, nothing major its almost all formatting

PyU4V/replication.py Outdated Show resolved Hide resolved
PyU4V/replication.py Outdated Show resolved Hide resolved
PyU4V/replication.py Outdated Show resolved Hide resolved
PyU4V/replication.py Show resolved Hide resolved
PyU4V/replication.py Show resolved Hide resolved
PyU4V/utils/file_handler.py Outdated Show resolved Hide resolved
…ancements

# Conflicts:
#	PyU4V/replication.py
Copy link
Contributor

@MichaelMcAleer MichaelMcAleer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good Paul, once the CSVReader delimiter comment is addressed ill give it my +1

Copy link
Contributor

@MichaelMcAleer MichaelMcAleer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, all requested changes made and CI has had 4 clean runs since most recent commit.

…rmatting for documentation, one minor typo and additional content added to create_storage_group_from_rdf_group
…rmatting for documentation, one minor typo and additional content added to create_storage_group_from_rdf_group,

configuration.rst -> line 152: arguements should be arguments
reccomendations.rst -> line 13: it's should be its
support.rst -> line 4: Github should be GitHub
tools.rst -> lines 37, 41, 73: Github should be GitHub
@rawstorage rawstorage merged commit bc4751d into master Feb 19, 2020
@rawstorage rawstorage deleted the rdfg_enhancements branch February 19, 2020 19:06
rawstorage added a commit that referenced this pull request Aug 12, 2022
Rdfg enhancements, documentation and change log updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants