lsslog 0.1.2 → 0.1.3.pre.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cb0edf72c46ecb1f08ef36f5ffc8ec3d105e031024781098b2b3a55d366157d
4
- data.tar.gz: 7743e783a23219018d3c0fb89bffaa67a4aecd4749027e75ca602cae24d23ac1
3
+ metadata.gz: 36ac1251929686451e604bd6220a9f3b6bd9ebb4b10f67b0139f25d1828fd86c
4
+ data.tar.gz: 7939c98bb2e10bd3c5c2eea3b5e27696b42bad4df4a4c5b4f50b38a0d3ebc678
5
5
  SHA512:
6
- metadata.gz: 8b4acef4dbae4672e0284d0d00a19fb478c30e1fc0b1e0b38a8238ec0e7f0b58384431db7c585f2983e8ba5424951721d467463b514a8766db9b5f0c82a26281
7
- data.tar.gz: b3739d48503a34bdc9c84168142511f5c23378a54d08692443ccbbb4e079d718a390734133319fa4de367223dd02c8545a3302ecbb476d1c335adfed67503c74
6
+ metadata.gz: f3e421227470489c6016621177637c7932b3cbd592ab69949f9d32ae7a435b0c7ab4b4d9ba1e185aac7fa1fbaa58de139e4b5948a4abc234aa1be108e61d5f25
7
+ data.tar.gz: d5749a70de5b5c06fd9850ceba88c147e74e44833fbbb22a829682574dc11c51331babee587db5140be2ff81fc8df3df866a0a53f27d040a29bfd5998e9af9ac
@@ -0,0 +1,9 @@
1
+ module Lsslog
2
+ module Services
3
+ class WriteProdTransaction < Base
4
+ def call(message)
5
+ client.write_prod_transaction(Lsslog::ProdTransaction.new(message))
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Lsslog
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3-rc1"
3
3
  end
data/lib/lsslog_pb.rb CHANGED
@@ -4,12 +4,12 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file('lsslog.proto', syntax: :proto3) do
8
- add_message 'lsslog.LssLog' do
7
+ add_file("lsslog.proto", :syntax => :proto3) do
8
+ add_message "lsslog.LssLog" do
9
9
  optional :transaction_id, :string, 1
10
10
  optional :flow_id, :string, 3
11
11
  optional :subflow_id, :string, 4
12
- optional :flow_dir, :enum, 2, 'lsslog.FlowDirection'
12
+ optional :flow_dir, :enum, 2, "lsslog.FlowDirection"
13
13
  optional :flow_depth, :int32, 5
14
14
  optional :system_id, :string, 6
15
15
  optional :flow_body, :string, 7
@@ -29,11 +29,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
29
  optional :is_completed, :bool, 21
30
30
  optional :tenant_id, :string, 22
31
31
  end
32
- add_message 'lsslog.LssRes' do
32
+ add_message "lsslog.LssRes" do
33
33
  optional :body, :string, 1
34
34
  optional :code, :int32, 2
35
35
  end
36
- add_message 'lsslog.VersionOut' do
36
+ add_message "lsslog.VersionOut" do
37
37
  optional :api_verion, :string, 1
38
38
  optional :branch, :string, 2
39
39
  optional :commit, :string, 3
@@ -41,23 +41,51 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
41
41
  optional :go_version, :string, 5
42
42
  optional :os_arch, :string, 6
43
43
  end
44
- add_message 'lsslog.EmptyIn' do
44
+ add_message "lsslog.EmptyIn" do
45
45
  end
46
- add_message 'lsslog.TransExpTime' do
46
+ add_message "lsslog.TransExpTime" do
47
47
  optional :flow_exp_time, :int32, 1
48
48
  optional :subflow_exp_time, :int32, 2
49
49
  end
50
- add_message 'lsslog.LssConfig' do
50
+ add_message "lsslog.LssConfig" do
51
51
  optional :flow_id, :string, 1
52
52
  optional :flow_name, :string, 2
53
53
  optional :enforce_sequence, :bool, 3
54
54
  optional :number_subflow, :int32, 4
55
55
  end
56
- add_message 'lsslog.LssConfigRes' do
57
- repeated :data, :message, 1, 'lsslog.LssConfig'
58
- optional :trans_exp_time, :message, 2, 'lsslog.TransExpTime'
56
+ add_message "lsslog.LssConfigRes" do
57
+ repeated :data, :message, 1, "lsslog.LssConfig"
58
+ optional :trans_exp_time, :message, 2, "lsslog.TransExpTime"
59
59
  end
60
- add_enum 'lsslog.FlowDirection' do
60
+ add_message "lsslog.ProdDetails" do
61
+ optional :sku, :string, 1
62
+ optional :vm_id, :string, 2
63
+ optional :stg_id, :string, 3
64
+ optional :nat_gw_id, :string, 4
65
+ optional :peer_id, :string, 5
66
+ optional :ec_id, :string, 6
67
+ optional :subnet_id, :string, 7
68
+ optional :elastic_ipa, :string, 8
69
+ optional :nic_id, :string, 9
70
+ optional :wordload_id, :string, 10
71
+ end
72
+ add_message "lsslog.PurchasedItem" do
73
+ optional :zone_id, :string, 1
74
+ optional :region_id, :string, 2
75
+ optional :item_cnt, :string, 3
76
+ repeated :skus, :string, 5
77
+ optional :detail, :message, 6, "lsslog.ProdDetails"
78
+ end
79
+ add_message "lsslog.ProdTransaction" do
80
+ optional :transaction_id, :string, 1
81
+ optional :tenant_id, :string, 2
82
+ repeated :details, :message, 3, "lsslog.PurchasedItem"
83
+ optional :region_id, :string, 4
84
+ optional :zone_id, :string, 5
85
+ optional :provisioned_at, :int64, 6
86
+ optional :created_at, :int64, 7
87
+ end
88
+ add_enum "lsslog.FlowDirection" do
61
89
  value :REQUEST, 0
62
90
  value :RESPONSE, 1
63
91
  end
@@ -65,12 +93,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
65
93
  end
66
94
 
67
95
  module Lsslog
68
- LssLog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.LssLog').msgclass
69
- LssRes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.LssRes').msgclass
70
- VersionOut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.VersionOut').msgclass
71
- EmptyIn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.EmptyIn').msgclass
72
- TransExpTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.TransExpTime').msgclass
73
- LssConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.LssConfig').msgclass
74
- LssConfigRes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.LssConfigRes').msgclass
75
- FlowDirection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('lsslog.FlowDirection').enummodule
96
+ LssLog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.LssLog").msgclass
97
+ LssRes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.LssRes").msgclass
98
+ VersionOut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.VersionOut").msgclass
99
+ EmptyIn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.EmptyIn").msgclass
100
+ TransExpTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.TransExpTime").msgclass
101
+ LssConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.LssConfig").msgclass
102
+ LssConfigRes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.LssConfigRes").msgclass
103
+ ProdDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.ProdDetails").msgclass
104
+ PurchasedItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.PurchasedItem").msgclass
105
+ ProdTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.ProdTransaction").msgclass
106
+ FlowDirection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("lsslog.FlowDirection").enummodule
76
107
  end
@@ -20,6 +20,7 @@ module Lsslog
20
20
  rpc :GetLssConfig, ::Lsslog::LssConfig, ::Lsslog::LssConfigRes
21
21
  rpc :RemoveLssConfig, ::Lsslog::LssConfig, ::Lsslog::LssRes
22
22
  rpc :SetTransExpTime, ::Lsslog::TransExpTime, ::Lsslog::LssRes
23
+ rpc :WriteProdTransaction, ::Lsslog::ProdTransaction, ::Lsslog::LssRes
23
24
  end
24
25
 
25
26
  Stub = Service.rpc_stub_class
data/proto/lsslog.proto CHANGED
@@ -2,13 +2,13 @@ syntax = "proto3";
2
2
  package lsslog;
3
3
 
4
4
  enum FlowDirection {
5
- REQUEST = 0;
6
- RESPONSE = 1;
5
+ REQUEST = 0;
6
+ RESPONSE = 1;
7
7
  }
8
8
 
9
9
  message LssLog {
10
- string transaction_id = 1;
11
- string flow_id = 3;
10
+ string transaction_id = 1;
11
+ string flow_id = 3;
12
12
  string subflow_id = 4;
13
13
  FlowDirection flow_dir = 2;
14
14
  int32 flow_depth = 5;
@@ -47,18 +47,6 @@ message VersionOut {
47
47
 
48
48
  message EmptyIn {}
49
49
 
50
- // message FlowChart {
51
- // string curr_flow_id = 1;
52
- // string prev_flow_id = 2;
53
- // string next_flow_id = 3;
54
- // bool enforced_sequence = 4;
55
- // }
56
-
57
- // message SubFlowChart {
58
- // int32 number_subflow = 1;
59
- // bool enforced_sequence = 2;
60
- // }
61
-
62
50
  message TransExpTime {
63
51
  int32 flow_exp_time = 1;
64
52
  int32 subflow_exp_time = 2;
@@ -68,9 +56,7 @@ message LssConfig {
68
56
  string flow_id = 1;
69
57
  string flow_name = 2;
70
58
  bool enforce_sequence = 3;
71
- // FlowChart flow_chart = 3;
72
59
  int32 number_subflow = 4;
73
- // SubFlowChart subflow_chart = 4;
74
60
  }
75
61
 
76
62
  message LssConfigRes {
@@ -78,6 +64,37 @@ message LssConfigRes {
78
64
  TransExpTime trans_exp_time = 2;
79
65
  }
80
66
 
67
+ message ProdDetails {
68
+ string sku = 1;
69
+ string vm_id = 2;
70
+ string stg_id = 3;
71
+ string nat_gw_id = 4;
72
+ string peer_id = 5;
73
+ string ec_id = 6;
74
+ string subnet_id = 7;
75
+ string elastic_ipa = 8;
76
+ string nic_id = 9;
77
+ string wordload_id = 10;
78
+ }
79
+
80
+ message PurchasedItem {
81
+ string zone_id = 1;
82
+ string region_id = 2;
83
+ string item_cnt = 3;
84
+ repeated string skus = 5;
85
+ ProdDetails detail = 6;
86
+ }
87
+
88
+ message ProdTransaction {
89
+ string transaction_id = 1;
90
+ string tenant_id = 2;
91
+ repeated PurchasedItem details = 3;
92
+ string region_id = 4;
93
+ string zone_id = 5;
94
+ int64 provisioned_at = 6;
95
+ int64 created_at = 7;
96
+ }
97
+
81
98
  service LssLogService {
82
99
  rpc WriteLog(LssLog) returns (LssRes) {};
83
100
  rpc GetVersion(EmptyIn) returns (VersionOut) {};
@@ -85,4 +102,5 @@ service LssLogService {
85
102
  rpc GetLssConfig(LssConfig) returns (LssConfigRes) {};
86
103
  rpc RemoveLssConfig(LssConfig) returns (LssRes) {};
87
104
  rpc SetTransExpTime(TransExpTime) returns (LssRes) {};
105
+ rpc WriteProdTransaction(ProdTransaction) returns (LssRes) {};
88
106
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lsslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3.pre.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thanh Ngo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -102,6 +102,7 @@ files:
102
102
  - lib/lsslog/services/set_lss_config.rb
103
103
  - lib/lsslog/services/set_trans_exp_time.rb
104
104
  - lib/lsslog/services/write_log.rb
105
+ - lib/lsslog/services/write_prod_transaction.rb
105
106
  - lib/lsslog/version.rb
106
107
  - lib/lsslog_pb.rb
107
108
  - lib/lsslog_services_pb.rb
@@ -113,7 +114,7 @@ files:
113
114
  homepage: https://gitlab.skylabteam.com/thanh.ngo/lsslog-ruby-client
114
115
  licenses: []
115
116
  metadata: {}
116
- post_install_message:
117
+ post_install_message:
117
118
  rdoc_options: []
118
119
  require_paths:
119
120
  - lib
@@ -124,12 +125,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
125
  version: 2.7.0
125
126
  required_rubygems_version: !ruby/object:Gem::Requirement
126
127
  requirements:
127
- - - ">="
128
+ - - ">"
128
129
  - !ruby/object:Gem::Version
129
- version: '0'
130
+ version: 1.3.1
130
131
  requirements: []
131
- rubygems_version: 3.1.2
132
- signing_key:
132
+ rubygems_version: 3.0.3
133
+ signing_key:
133
134
  specification_version: 4
134
135
  summary: Lsslog Ruby Client
135
136
  test_files: []