Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inau
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
util
inau
Commits
b9b362cc
Commit
b9b362cc
authored
4 years ago
by
Alessio Igor Bogani
Browse files
Options
Downloads
Patches
Plain Diff
Massive rewritten of the inau-dispatcher
parent
f622cbb2
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inau-dispatcher.py
+245
-249
245 additions, 249 deletions
inau-dispatcher.py
lib/db.py
+6
-6
6 additions, 6 deletions
lib/db.py
with
251 additions
and
255 deletions
inau-dispatcher.py
+
245
−
249
View file @
b9b362cc
This diff is collapsed.
Click to expand it.
lib/db.py
+
6
−
6
View file @
b9b362cc
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy
import
Column
,
Integer
,
String
,
DateTime
,
Boolean
,
Text
,
ForeignKey
,
func
#
from sqlalchemy.orm import relationship
from
sqlalchemy.orm
import
relationship
from
enum
import
Enum
,
IntEnum
import
datetime
...
...
@@ -17,22 +17,22 @@ class Architectures(Base):
__tablename__
=
'
architectures
'
id
=
Column
(
Integer
,
primary_key
=
True
)
name
=
Column
(
String
(
255
),
unique
=
True
,
nullable
=
False
)
#
platforms = relationship('Platforms', back_populates='architecture')
platforms
=
relationship
(
'
Platforms
'
,
back_populates
=
'
architecture
'
)
class
Distributions
(
Base
):
__tablename__
=
'
distributions
'
id
=
Column
(
Integer
,
primary_key
=
True
)
name
=
Column
(
String
(
255
),
nullable
=
False
)
version
=
Column
(
String
(
255
),
nullable
=
False
)
#
platforms = relationship('Platforms', back_populates='distribution')
#
platforms
=
relationship
(
'
Platforms
'
,
back_populates
=
'
distribution
'
)
class
Platforms
(
Base
):
__tablename__
=
'
platforms
'
id
=
Column
(
Integer
,
primary_key
=
True
)
distribution_id
=
Column
(
Integer
,
ForeignKey
(
'
distributions.id
'
),
nullable
=
False
)
architecture_id
=
Column
(
Integer
,
ForeignKey
(
'
architectures.id
'
),
nullable
=
False
)
#
architecture = relationship('Architectures', back_populates='platforms')
#
distribution = relationship('Distributions', back_populates='platforms')
architecture
=
relationship
(
'
Architectures
'
,
back_populates
=
'
platforms
'
)
distribution
=
relationship
(
'
Distributions
'
,
back_populates
=
'
platforms
'
)
# servers = relationship('Servers', back_populates='platform')
#
#class Facilities(Base):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment