TitanGraphDB + Cassandraを使用しています。次のようにTitanを起動しています
cd titan-cassandra-0.3.1
bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties
上記の Titan + Cassandra との通信に使用できる Rexster シェルがあります。
cd rexster-console-2.3.0
bin/rexster-console.sh
Python プログラムから Titan Graph DB をプログラムしたいのですが、そのために電球パッケージを使用しています。
以下に示すように、電球を使用してPythonから頂点を作成します。
fe1 = self.g.vertices.get_or_create('switch_dpid',switch_dpid,
{'actionOutputPort':actionOutputPort,
'switch_state':'FE_SWITCH_UPDATED',
'matchInPort': MatchInPort,
'type': 'flow_entry',
'user_state':'FE_USER_ADD',
'actions': ['type':'ACTION_OUTPUT', 'action':[port=actionOutputPort maxLen=0];]})
これは私にエラーを与えています
'actions': ['type':'ACTION_OUTPUT', 'action':[port=actionOutputPort maxLen=0];]})
SyntaxError: invalid syntax
Rexster コンソールから期待される出力は次のとおりです。
switch_dpid=00:00:00:00:00:00:02:05,
actionOutputPort=1,
switch_state=FE_SWITCH_UPDATED,
matchInPort=2,
flow_entry_id=0x4ee30a9400000012,
type=flow_entry,
actions=[[type=ACTION_OUTPUT action=[port=1 maxLen=0]];],
user_state=FE_USER_ADD
上記のようになるようにプログラムするにはどうすればよいactionsですか。