forked from n-ando/OpenRTM-aist-Python
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from Nobu19800/feature/httptransport
HTTPTransportの追加
- Loading branch information
Showing
7 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
## | ||
# @file HTTPTransport.py | ||
# @brief HTTP Transport module | ||
# @date $Date: $ | ||
# @author Nobuhiko Miyamoto | ||
|
||
|
||
import os | ||
from omniORB import httpTP | ||
import OpenRTM_aist | ||
|
||
|
||
def HTTPTransportInit(manager): | ||
|
||
#os.environ['ORBtraceLevel'] = '25' | ||
#os.environ['ORBendPoint'] = 'giop:http:ws://127.0.0.1:2810/ws' | ||
#os.environ['ORBsslVerifyMode'] = "none" | ||
|
||
prop = manager.getConfig() | ||
certificate_authority_file = prop.getProperty( | ||
"corba.http.certificate_authority_file") | ||
key_file = prop.getProperty("corba.http.key_file") | ||
key_file_password = prop.getProperty("corba.http.key_file_password") | ||
|
||
corba_args = prop.getProperty("corba.args") | ||
|
||
if not ("giop:http" in corba_args): | ||
corba_args += " -ORBendPoint giop:http:ws://127.0.0.1:8001/ws" | ||
|
||
if not OpenRTM_aist.toBool(prop.getProperty( | ||
"manager.is_master"), "YES", "NO", True): | ||
if not prop.getProperty("corba.endpoints"): | ||
if not prop.getProperty("corba.endpoint"): | ||
if str(prop.getProperty("corba.args")).find( | ||
"-ORBendPoint") == -1: | ||
corba_args += " -ORBendPoint giop:tcp::" | ||
|
||
prop.setProperty("corba.args", corba_args) | ||
|
||
if certificate_authority_file: | ||
httpTP.set_CA(certificate_authority_file, None) | ||
if key_file or key_file_password: | ||
httpTP.set_key(key_file, key_file_password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Empty file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
logger.enable: YES | ||
logger.log_level: DEBUG | ||
#logger.file_name: stdout | ||
|
||
manager.modules.load_path: ./ | ||
manager.preload.modules: HTTPTransport.py | ||
|
||
corba.args:-ORBserverTransportRule "* http" -ORBclientTransportRule "* http" -ORBendPoint giop:http:http:///call | ||
corba.nameservers: http://127.0.0.1:2809/call | ||
corba.master_manager: giop:http:http://127.0.0.1:2810/call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
logger.enable: YES | ||
logger.log_level: DEBUG | ||
#logger.file_name: stdout | ||
|
||
manager.modules.load_path: ./ | ||
manager.preload.modules: HTTPTransport.py | ||
|
||
corba.http.certificate_authority_file:../ssl/test/root.crt | ||
corba.http.key_file:../ssl/test/server.pem | ||
corba.http.key_file_password:password | ||
|
||
corba.args:-ORBserverTransportRule "* http" -ORBclientTransportRule "* http" -ORBendPoint giop:http:https:///call | ||
corba.nameservers: https://127.0.0.1:2809/call | ||
corba.master_manager: giop:http:https://127.0.0.1:2810/call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
logger.enable: YES | ||
logger.log_level: DEBUG | ||
#logger.file_name: stdout | ||
|
||
manager.modules.load_path: ./ | ||
manager.preload.modules: HTTPTransport.py | ||
|
||
corba.args:-ORBserverTransportRule "* http" -ORBclientTransportRule "* http" -ORBendPoint giop:http:ws:///ws | ||
corba.nameservers: ws://127.0.0.1:2809/ws | ||
corba.master_manager: giop:http:ws://127.0.0.1:2810/ws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
logger.enable: YES | ||
logger.log_level: DEBUG | ||
#logger.file_name: stdout | ||
|
||
manager.modules.load_path: ./ | ||
manager.preload.modules: HTTPTransport.py | ||
|
||
corba.http.certificate_authority_file:../ssl/test/root.crt | ||
corba.http.key_file:../ssl/test/server.pem | ||
corba.http.key_file_password:password | ||
|
||
corba.args:-ORBserverTransportRule "* http" -ORBclientTransportRule "* http" -ORBendPoint giop:http:wss:///ws | ||
corba.nameservers: wss://127.0.0.1:2809/ws | ||
corba.master_manager: giop:http:wss://127.0.0.1:2810/ws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters