usd 1.3.4.1 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rusdc +24 -2
- data/change_log.md +4 -0
- data/usd.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70fbd18a6341df303be1897efab57eefae5c72db3f4e94af89cd7da4900281ad
|
4
|
+
data.tar.gz: ee6882af88f19c208d113bab4d96b2b7725d4e0c635b02c6e885153dd6c95475
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9954d1e3f35a7d2f506e94cf5354f2e3c4ff74b27c855f56fe7e13310bd5cef8e5addc4937e1c01dfee23e803680da3e6c39a32eab22812efb8708279031d88
|
7
|
+
data.tar.gz: e9f4192677bb57d007d8eb98640e8a5e2de42d8053f906caae1ec3494c314f4ef41753b06151a842c935f8e972740319d7ae65d4bfec2fa7bb8105c4971cd550
|
data/bin/rusdc
CHANGED
@@ -236,7 +236,7 @@ class Rusdc < Thor
|
|
236
236
|
puts loadcon.request("/caisd-rest/attmnt/#{ids[0]["@id"]}/file-resource",{:unchanged => true}) if ids.class == Array
|
237
237
|
end
|
238
238
|
|
239
|
-
desc "in_add_attachment <in> <file>", "attach
|
239
|
+
desc "in_add_attachment <in> <file>", "attach a file to an incident or problem"
|
240
240
|
def in_add_attachment(incident, file)
|
241
241
|
response = loadcon.upload_attachment(file)
|
242
242
|
puts response
|
@@ -287,7 +287,7 @@ class Rusdc < Thor
|
|
287
287
|
end
|
288
288
|
end
|
289
289
|
|
290
|
-
desc "list_attachments_of_in <in>", "list all attachments of an
|
290
|
+
desc "list_attachments_of_in <in>", "list all attachments of an incident or problem"
|
291
291
|
def list_attachments_of_in(incident)
|
292
292
|
att_in = loadcon.search("lrel_attachments_requests",{'fields' => "attmnt","wc" => "cr.ref_num = '#{incident}'"})
|
293
293
|
att_in.each do |att|
|
@@ -339,6 +339,28 @@ class Rusdc < Thor
|
|
339
339
|
puts loadcon.create({:type => "json", :data => json})
|
340
340
|
end
|
341
341
|
|
342
|
+
desc "nr_add_contact <nr> <cnt_email>", "add contact to configuration-item"
|
343
|
+
def nr_add_contact(nr, cnt_email)
|
344
|
+
template = ERB.new <<-EOF
|
345
|
+
{
|
346
|
+
"lrel_cenv_cntref": {
|
347
|
+
"nr": {
|
348
|
+
"@id": "<%= uid_nr %>"
|
349
|
+
},
|
350
|
+
"cnt": {
|
351
|
+
"@id": "<%= uid_cnt %>"
|
352
|
+
}
|
353
|
+
}
|
354
|
+
}
|
355
|
+
EOF
|
356
|
+
json = template.result_with_hash({
|
357
|
+
:uid_nr => loadcon.request("/caisd-rest/nr/COMMON_NAME-#{nr}")["nr"]["@id"],
|
358
|
+
:uid_cnt => loadcon.search("cnt",{'fields' => "@id","wc" => "email_address = '#{cnt_email}'"})[0]["@id"]
|
359
|
+
})
|
360
|
+
#puts "create relation to chg with json: #{json}"
|
361
|
+
puts loadcon.create({:type => "json", :data => json})
|
362
|
+
end
|
363
|
+
|
342
364
|
desc "nr_add_org <nr> <org>", "add an Organisation to a ConfigurationItem"
|
343
365
|
def nr_add_org(nr, org)
|
344
366
|
template = ERB.new <<-EOF
|
data/change_log.md
CHANGED
data/usd.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'usd'
|
3
|
-
spec.version = '1.3.
|
4
|
-
spec.date = '2020-09-
|
3
|
+
spec.version = '1.3.5'
|
4
|
+
spec.date = '2020-09-25'
|
5
5
|
spec.summary = "SDM REST-API-Calls"
|
6
6
|
spec.description = "a Ruby class and a commandlinetool for SDM REST-API-Calls"
|
7
7
|
spec.authors = ["Oliver Gaida"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Gaida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|