Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
49959191
Commit
49959191
authored
9 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
fix service host/port issue for base cli class
parent
27aacb57
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/python/dm/common/cli/dmCli.py
+1
-21
1 addition, 21 deletions
src/python/dm/common/cli/dmCli.py
src/python/dm/common/cli/dmRestCli.py
+23
-0
23 additions, 0 deletions
src/python/dm/common/cli/dmRestCli.py
with
24 additions
and
21 deletions
src/python/dm/common/cli/dmCli.py
+
1
−
21
View file @
49959191
...
@@ -32,8 +32,6 @@ class DmCli(object):
...
@@ -32,8 +32,6 @@ class DmCli(object):
self
.
options
=
{}
self
.
options
=
{}
self
.
args
=
[]
self
.
args
=
[]
self
.
validArgCount
=
validArgCount
self
.
validArgCount
=
validArgCount
self
.
serviceHost
=
None
self
.
servicePort
=
None
self
.
optionGroupDict
=
{}
self
.
optionGroupDict
=
{}
commonGroup
=
'
Common Options
'
commonGroup
=
'
Common Options
'
...
@@ -121,27 +119,9 @@ class DmCli(object):
...
@@ -121,27 +119,9 @@ class DmCli(object):
if
consoleLogLevel
:
if
consoleLogLevel
:
LoggingManager
.
getInstance
().
setConsoleLogLevel
(
consoleLogLevel
)
LoggingManager
.
getInstance
().
setConsoleLogLevel
(
consoleLogLevel
)
# Service host, port, etc.
configManager
=
ConfigurationManager
.
getInstance
()
self
.
serviceHost
=
self
.
options
.
serviceHost
configManager
.
setServiceHost
(
self
.
serviceHost
)
self
.
servicePort
=
self
.
options
.
servicePort
configManager
.
setServicePort
(
self
.
servicePort
)
self
.
serviceProtocol
=
self
.
options
.
serviceProtocol
configManager
.
setServiceProtocol
(
self
.
serviceProtocol
)
# SSL options, comment out for now
#self.sslCaCertFile = self.options.sslCaCertFile
#if self.sslCaCertFile:
# configManager.setSslCaCertFile(self.sslCaCertFile)
#self.sslCertFile = self.options.sslCertFile
#if self.sslCertFile:
# configManager.setSslCertFile(self.sslCertFile)
#self.sslKeyFile = self.options.sslKeyFile
#if self.sslKeyFile:
# configManager.setSslKeyFile(self._sslKeyFile)
# Check session cache.
# Check session cache.
configManager
=
ConfigurationManager
.
getInstance
()
try
:
try
:
self
.
checkSessionCache
()
self
.
checkSessionCache
()
except
Exception
,
ex
:
except
Exception
,
ex
:
...
...
This diff is collapsed.
Click to expand it.
src/python/dm/common/cli/dmRestCli.py
+
23
−
0
View file @
49959191
...
@@ -8,6 +8,8 @@ class DmRestCli(DmCli):
...
@@ -8,6 +8,8 @@ class DmRestCli(DmCli):
def
__init__
(
self
,
validArgCount
=
0
):
def
__init__
(
self
,
validArgCount
=
0
):
DmCli
.
__init__
(
self
,
validArgCount
)
DmCli
.
__init__
(
self
,
validArgCount
)
self
.
serviceHost
=
None
self
.
servicePort
=
None
serviceGroup
=
'
Service Options
'
serviceGroup
=
'
Service Options
'
self
.
addOptionGroup
(
serviceGroup
,
None
)
self
.
addOptionGroup
(
serviceGroup
,
None
)
...
@@ -30,3 +32,24 @@ class DmRestCli(DmCli):
...
@@ -30,3 +32,24 @@ class DmRestCli(DmCli):
def
getDefaultServiceProtocol
(
self
):
def
getDefaultServiceProtocol
(
self
):
return
ConfigurationManager
.
getInstance
().
getWebServiceProtocol
()
return
ConfigurationManager
.
getInstance
().
getWebServiceProtocol
()
def
parseArgs
(
self
,
usage
=
None
):
DmCli
.
parseArgs
(
self
,
usage
)
configManager
=
ConfigurationManager
.
getInstance
()
self
.
serviceHost
=
self
.
options
.
serviceHost
configManager
.
setServiceHost
(
self
.
serviceHost
)
self
.
servicePort
=
self
.
options
.
servicePort
configManager
.
setServicePort
(
self
.
servicePort
)
self
.
serviceProtocol
=
self
.
options
.
serviceProtocol
configManager
.
setServiceProtocol
(
self
.
serviceProtocol
)
# SSL options, comment out for now
#self.sslCaCertFile = self.options.sslCaCertFile
#if self.sslCaCertFile:
# configManager.setSslCaCertFile(self.sslCaCertFile)
#self.sslCertFile = self.options.sslCertFile
#if self.sslCertFile:
# configManager.setSslCertFile(self.sslCertFile)
#self.sslKeyFile = self.options.sslKeyFile
#if self.sslKeyFile:
# configManager.setSslKeyFile(self._sslKeyFile)
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