-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
PKG_DIR = $(NCS_DIR)/packages/auth/cisco-nso-saml2-auth
NCS_VER = $(shell ncs --version)
NCS_VER_SPLIT = $(shell python -c "ver=str('$(NCS_VER)').split('.'); print(ver[0]+'.'+ver[1])")
.PHONY: all
all: saml_pkg
$(MAKE) stop start cisco-nso-saml2-auth.xml
saml_pkg: packages/cisco-nso-saml2-auth \
cisco-nso-saml2-auth-deps
$(MAKE) -C packages/cisco-nso-saml2-auth/src all
packages/cisco-nso-saml2-auth:
cd packages/ ; git clone https://github.com/NSO-developer/nso-sso-duo-integration-package.git
cd packages/nso-sso-duo-integration-package ; git checkout $(NCS_VER_SPLIT)
cd packages/ ; mv nso-sso-duo-integration-package cisco-nso-saml2-auth
pyvenv:
pip $(PIP_OPTS) install pip --upgrade
cisco-nso-saml2-auth-deps: pyvenv
pip install -r $(PKG_DIR)/requirements.txt
touch $@
keys:
cisco-nso-saml2-auth.xml: keys
bash start.sh $(DUO_URL) $(NSO_URL)
.PHONY: clean
clean:
$(MAKE) -C packages/cisco-nso-saml2-auth/src clean || true
rm -rf ./netsim running.DB logs/* state/* ncs-cdb/*
rm -rf keys __pycache__
rm -f cisco-nso-saml2-auth-deps cisco-nso-saml2-auth.xml
rm -rf packages/cisco-nso-saml2-auth
rm -rf packages/nso-sso-duo-integration-package
clean-logs:
rm -f logs/*
.PHONY: start
start:
ncs
.PHONY: stop
stop:
-ncs --stop
.PHONY: cli-c
cli-c:
ncs_cli -C -uadmin
.PHONY: cli-j
cli-j:
ncs_cli -J -uadmin