Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloudify
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
data-infrastructure-services
cloudify
Commits
f13674bd
Commit
f13674bd
authored
1 month ago
by
Fabian Wachsmann
Browse files
Options
Downloads
Patches
Plain Diff
Edit cloudify_tco2reg.py
parent
ab7946a6
No related branches found
No related tags found
No related merge requests found
Pipeline
#100279
failed
1 month ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/cloudify_tco2reg.py
+0
-12
0 additions, 12 deletions
scripts/cloudify_tco2reg.py
with
0 additions
and
12 deletions
scripts/cloudify_tco2reg.py
+
0
−
12
View file @
f13674bd
...
@@ -40,18 +40,6 @@ cwd = os.getcwd()
...
@@ -40,18 +40,6 @@ cwd = os.getcwd()
#ssl_keyfile=f"{cwd}/key.pem"
#ssl_keyfile=f"{cwd}/key.pem"
#ssl_certfile=f"{cwd}/cert.pem"
#ssl_certfile=f"{cwd}/cert.pem"
if
not
os
.
path
.
isfile
(
ssl_keyfile
)
or
not
os
.
path
.
isfile
(
ssl_certfile
):
cn
=
os
.
uname
().
nodename
# Equivalent to `!echo $HOSTNAME`
openssl_cmd
=
[
"
openssl
"
,
"
req
"
,
"
-x509
"
,
"
-newkey
"
,
"
rsa:4096
"
,
"
-keyout
"
,
"
key.pem
"
,
"
-out
"
,
"
cert.pem
"
,
"
-sha256
"
,
"
-days
"
,
"
3650
"
,
"
-nodes
"
,
"
-subj
"
,
f
"
/C=XX/ST=Hamburg/L=Hamburg/O=Test/OU=Test/CN=
{
cn
}
"
]
subprocess
.
run
(
openssl_cmd
,
check
=
True
)
def
is_port_free
(
port
,
host
=
"
localhost
"
):
def
is_port_free
(
port
,
host
=
"
localhost
"
):
with
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
as
s
:
with
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
as
s
:
return
s
.
connect_ex
((
host
,
port
))
!=
0
# Returns True if the port is free
return
s
.
connect_ex
((
host
,
port
))
!=
0
# Returns True if the port is free
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment