-
Notifications
You must be signed in to change notification settings - Fork 355
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
DB models for host mapping #596
DB models for host mapping #596
Conversation
7f0971b
to
cc67954
Compare
Codecov Report
@@ Coverage Diff @@
## host_mapping #596 +/- ##
================================================
+ Coverage 72.13% 72.28% +0.14%
================================================
Files 141 141
Lines 12211 12545 +334
Branches 1446 1480 +34
================================================
+ Hits 8809 9068 +259
- Misses 2909 2976 +67
- Partials 493 501 +8
|
cc67954
to
47a70cb
Compare
f76942a
to
659ef9e
Compare
659ef9e
to
e003ac5
Compare
@NajmudheenCT @wisererik @kumarashit @joseph-v @AmitRoushan , pls help to review |
delfin/db/sqlalchemy/models.py
Outdated
@@ -286,3 +287,115 @@ class FailedTask(BASE, DelfinBase): | |||
job_id = Column(String(36)) | |||
deleted_at = Column(DateTime) | |||
deleted = Column(Boolean, default=False) | |||
|
|||
|
|||
class StorageInitiator(BASE, DelfinBase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove Storage
prefix for models if it not adds clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated StorageInitiator
delfin/db/sqlalchemy/models.py
Outdated
name = Column(String(255)) | ||
description = Column(String(255)) | ||
os_type = Column(String(255)) | ||
storage_initiators = Column(Text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a poosibility to use Array type https://docs.sqlalchemy.org/en/14/core/type_basics.html#sqlalchemy.types.ARRAY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = Column(String(255)) | ||
description = Column(String(255)) | ||
os_type = Column(String(255)) | ||
storage_host_initiators = Column(Text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove as we keep host info in initiator
These changes are already part of PR #606. |
What this PR does / why we need it:
This PR adds db models needed for host mapping feature
Below tables are newly added
StorageInitiator
StorageHost
StorageHostGroup
PortGroup
VolumeGroup
MaskingView
StorageHostGrpStorageHostRelation
PortGrpPortRelation
VolumeGrpVolumeRelation
Note : Some of these tables contain array of items for which Text data type is used. Array items will be separated using delimiters
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note:
Test report: