Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
dashboardv3
inventory-provider
Commits
f96e5f81
Commit
f96e5f81
authored
6 years ago
by
Robert Latta
Browse files
Options
Downloads
Patches
Plain Diff
Cast SQL return values to lower case for easy comparison
parent
3fd4fe15
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inventory_provider/opsdb.py
+14
-14
14 additions, 14 deletions
inventory_provider/opsdb.py
with
14 additions
and
14 deletions
inventory_provider/opsdb.py
+
14
−
14
View file @
f96e5f81
...
@@ -25,10 +25,10 @@ equipment_location_query = """SELECT
...
@@ -25,10 +25,10 @@ equipment_location_query = """SELECT
circuit_hierarchy_query
=
"""
SELECT
circuit_hierarchy_query
=
"""
SELECT
pc.name AS parent_circuit,
pc.name AS parent_circuit,
pc.absid AS parent_circuit_id,
pc.absid AS parent_circuit_id,
pc.status AS parent_circuit_status,
LOWER(
pc.status
)
AS parent_circuit_status,
cc.name AS child_circuit,
cc.name AS child_circuit,
cc.absid AS child_circuit_id,
cc.absid AS child_circuit_id,
cc.status AS child_circuit_status,
LOWER(
cc.status
)
AS child_circuit_status,
cg.segment_group AS segment_group
cg.segment_group AS segment_group
FROM circuit_glue cg
FROM circuit_glue cg
INNER JOIN circuit pc ON pc.absid = cg.PTR_circuit
INNER JOIN circuit pc ON pc.absid = cg.PTR_circuit
...
@@ -39,9 +39,9 @@ retrieve_services_query = """SELECT *
...
@@ -39,9 +39,9 @@ retrieve_services_query = """SELECT *
FROM (SELECT
FROM (SELECT
c.absid AS id,
c.absid AS id,
c.name,
c.name,
c.
status,
LOWER(c.status) AS
status,
c.
circuit_type,
LOWER(c.circuit_type) AS
circuit_type,
c.
service_type,
LOWER(c.service_type) AS
service_type,
events.short_descr AS project,
events.short_descr AS project,
e.name AS equipment,
e.name AS equipment,
cc.port_a AS port,
cc.port_a AS port,
...
@@ -69,9 +69,9 @@ retrieve_services_query = """SELECT *
...
@@ -69,9 +69,9 @@ retrieve_services_query = """SELECT *
SELECT
SELECT
c.absid AS id,
c.absid AS id,
c.name,
c.name,
c.
status,
LOWER(c.status) AS
status,
c.
circuit_type,
LOWER(c.circuit_type) AS
circuit_type,
c.
service_type,
LOWER(c.service_type) AS
service_type,
events.short_descr AS project,
events.short_descr AS project,
e.name AS equipment,
e.name AS equipment,
cc.port_b AS port,
cc.port_b AS port,
...
@@ -99,9 +99,9 @@ retrieve_services_query = """SELECT *
...
@@ -99,9 +99,9 @@ retrieve_services_query = """SELECT *
SELECT
SELECT
c.absid AS id,
c.absid AS id,
c.name,
c.name,
c.
status,
LOWER(c.status) AS
status,
c.
circuit_type,
LOWER(c.circuit_type) AS
circuit_type,
c.
service_type,
LOWER(c.service_type) AS
service_type,
events.short_descr AS project,
events.short_descr AS project,
e.name AS equipment,
e.name AS equipment,
cc.port_a_OUT AS port,
cc.port_a_OUT AS port,
...
@@ -130,9 +130,9 @@ retrieve_services_query = """SELECT *
...
@@ -130,9 +130,9 @@ retrieve_services_query = """SELECT *
SELECT
SELECT
c.absid AS id,
c.absid AS id,
c.name,
c.name,
c.
status,
LOWER(c.status) AS
status,
c.
circuit_type,
LOWER(c.circuit_type) AS
circuit_type,
c.
service_type,
LOWER(c.service_type) AS
service_type,
events.short_descr AS project,
events.short_descr AS project,
e.name AS equipment,
e.name AS equipment,
cc.port_b_OUT AS port,
cc.port_b_OUT AS port,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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