Skip to content

Commit d7b41a1

Browse files
authored
Merge branch 'iam-veeramalla:main' into main
2 parents 568de6e + b5e1c51 commit d7b41a1

File tree

5 files changed

+87
-10
lines changed

5 files changed

+87
-10
lines changed

Day-14/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Github-JIRA intergration Project

Day-15/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Github-JIRA intergration Project - (Part-2)

Day-15/examples/hello-world.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from flask import Flask
2+
3+
app = Flask(__name__)
4+
5+
@app.route('/')
6+
def hello_world():
7+
return 'Hello, World!'
8+
9+
if __name__ == '__main__':
10+
app.run("0.0.0.0")

Day-15/github-jira.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This code sample uses the 'requests' library:
2+
# http://docs.python-requests.org
3+
import requests
4+
from requests.auth import HTTPBasicAuth
5+
import json
6+
from flask import Flask
7+
8+
app = Flask(__name__)
9+
10+
# Define a route that handles GET requests
11+
@app.route('/createJira', methods=['POST'])
12+
def createJira():
13+
14+
url = "https://veeramallaabhishek.atlassian.net/rest/api/3/issue"
15+
16+
API_TOKEN=""
17+
18+
auth = HTTPBasicAuth("", API_TOKEN)
19+
20+
headers = {
21+
"Accept": "application/json",
22+
"Content-Type": "application/json"
23+
}
24+
25+
payload = json.dumps( {
26+
"fields": {
27+
"description": {
28+
"content": [
29+
{
30+
"content": [
31+
{
32+
"text": "Order entry fails when selecting supplier.",
33+
"type": "text"
34+
}
35+
],
36+
"type": "paragraph"
37+
}
38+
],
39+
"type": "doc",
40+
"version": 1
41+
},
42+
"project": {
43+
"key": "AB"
44+
},
45+
"issuetype": {
46+
"id": "10006"
47+
},
48+
"summary": "Main order flow broken",
49+
},
50+
"update": {}
51+
} )
52+
53+
54+
response = requests.request(
55+
"POST",
56+
url,
57+
data=payload,
58+
headers=headers,
59+
auth=auth
60+
)
61+
62+
return json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": "))
63+
64+
if __name__ == '__main__':
65+
app.run(host='0.0.0.0', port=5000)

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,38 +61,38 @@
6161
- Practice exercises and examples:
6262
- Example: Print list of files in the list of folders provided
6363

64-
## Day 11: Working with Dictionaries and Sets
64+
## Day 11: Working with Dictionaries and Sets (Project-1)
6565
- Dictionaries and key-value pairs.
6666
- Sets and set operations.
6767
- Practice exercises and examples:
6868
- Example: Managing a dictionary of server configurations and optimizing retrieval.
6969

70-
## Day 12: Python Tasks for DevOps (Part 1) - File Operations
70+
## Day 12: Python Tasks for DevOps (Part 1) - File Operations (Project-2)
7171
- Introduction to File Operations and Boto3.
7272
- Automating File operations.
7373
- Practice exercises and examples:
7474
- Example: Update a server resources in the server.conf file up on external notification.
7575

76-
## Day 13: Python Tasks for DevOps (Part 2)
76+
## Day 13: Python Tasks for DevOps (Part 2) (Project-3)
7777
- Using Fabric for remote task automation.
7878
- AWS automation with Boto3.
7979
- Managing EC2 instances, S3 buckets, and more.
8080
- Practice exercises and examples:
8181
- Example: Creating a python script using boto3 to implement serverless functions.
8282

83-
## Day 14: Working with RESTful APIs
83+
## Day 14: Github-JIRA intergration Project - (Project-4)
8484
- Introduction to RESTful APIs.
8585
- Making HTTP requests using Python.
8686
- Parsing JSON responses and error handling.
8787
- Practice exercises and examples:
88-
- Example: Developing a script to monitor RESTful API endpoints for your DevOps tools.
88+
- Example: Write a Python API which listens on a github comment and creates a ticket in JIRA.
8989

90-
## Day 15: Data Serialization and Configuration Files
91-
- Serializing and deserializing data (JSON, YAML).
92-
- Managing configuration data.
93-
- DevOps use cases for configuration files.
90+
## Day 15: Github-JIRA intergration Project - (Project-4) - (Part-2)
91+
- Introduction to Flask.
92+
- Write your first API in python.
93+
- How to handle API calls and deploy your API to a server.
9494
- Practice exercises and examples:
95-
- Example: Building a configuration manager to handle application settings in JSON format.
95+
- Example: Write a Python API which listens on a github comment and creates a ticket in JIRA.
9696

9797
## Day 16: Automation with Cron Jobs
9898
- Scheduling automated tasks using cron.

0 commit comments

Comments
 (0)