nifi_sdk_ruby 0.0.1 → 0.0.2
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 +4 -4
- data/.gitignore +12 -0
- data/README.md +36 -14
- data/examples/IN.hmStaff.taskStatus.xml +1938 -0
- data/examples/basic.rb +31 -6
- data/lib/nifi_sdk_ruby/version.rb +1 -1
- data/lib/nifi_sdk_ruby.rb +58 -6
- data/nifi_sdk_ruby.gemspec +1 -0
- data/pkg/.gitkeep +0 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bb97fd650f0de430ee1b893f5abff6bf28c59f1
|
4
|
+
data.tar.gz: 049c9dc2772ee4c9acd83b1ae8f69e686f522a0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 284592edc6779800145e9150086f513210c7e67bb96ab5c985afe075321d9b40e650f57120cc1ae15a0a646b51f10291deed51fc0588f62b3774b15993922609
|
7
|
+
data.tar.gz: 28e7e0e03ded209b4458a65e69ab0df00cb686f384e0e2f8387a1f1b347281b8f3bbb1e1722416a7536cbd1eb64114e2a9f7b45b475740aa5de4df97fd4975c6
|
data/.gitignore
ADDED
data/README.md
CHANGED
@@ -4,6 +4,8 @@ A RUBY SDK to use [APACHE NIFI](https://nifi.apache.org/) API.
|
|
4
4
|
|
5
5
|
See more at [APACHE NIFI API](https://nifi.apache.org/docs/nifi-docs/rest-api/index.html).
|
6
6
|
|
7
|
+
https://rubygems.org/gems/nifi_sdk_ruby
|
8
|
+
|
7
9
|
## Installation
|
8
10
|
|
9
11
|
Add this line to your application's Gemfile:
|
@@ -22,28 +24,48 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
27
|
+
### Instanciate the client
|
25
28
|
|
26
|
-
```
|
27
|
-
require '
|
29
|
+
```ruby
|
30
|
+
require 'nifi_sdk_ruby'
|
28
31
|
|
29
32
|
nifi_client = Nifi.new()
|
30
33
|
nifi_client.set_debug(true)
|
31
34
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
+
```
|
36
|
+
|
37
|
+
### Get root id
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
# Get Root Process Group
|
41
|
+
pg_root = nifi_client.get_process_group()
|
35
42
|
puts "PG Root's ID"
|
36
|
-
puts
|
37
|
-
|
38
|
-
|
43
|
+
puts pg_root['id']
|
44
|
+
```
|
45
|
+
|
46
|
+
### Create new PG
|
39
47
|
|
40
|
-
|
41
|
-
|
42
|
-
puts
|
43
|
-
|
44
|
-
puts some_pg
|
45
|
-
puts "\n"
|
48
|
+
```ruby
|
49
|
+
new_pg = nifi_client.create_process_group(:name => 'test')
|
50
|
+
puts new_pg
|
51
|
+
```
|
46
52
|
|
53
|
+
### Get all attrs of the Process Group with ID 9c3ebb60-015b-1000-1027-b27d47832152 (PG Root's child)
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
puts nifi_client.get_process_group(:id => new_pg['id'])
|
57
|
+
```
|
58
|
+
|
59
|
+
### Delete some PG
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
puts nifi_client.delete_process_group(new_pg['id'])
|
63
|
+
```
|
64
|
+
|
65
|
+
# Upload a template to Root PG
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
puts nifi_client.upload_template(:path => 'IN.hmStaff.taskStatus.xml')
|
47
69
|
```
|
48
70
|
|
49
71
|
## Contributing
|